-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharpter5(1).txt
74 lines (70 loc) · 1.18 KB
/
charpter5(1).txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
A.温度转换
/*
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std ;
int main()
{
double a ,b ;
cin >> a ;
cout << (double)(a-32.0)/1.8 << endl ;
return 0 ;
}
*/
B.数字分离
/*
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <stack>
using namespace std ;
int main()
{
stack<int> s ;
long long a ; cin >> a ;
while(a!=0)
{
s.push(a%10) ;
a /= 10 ;
}
while(!s.empty())
{
cout << s.top() << " " ;
s.pop() ;
}
cout << endl ;
return 0 ;
}
*/
C.评分统计II
/*
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <stack>
using namespace std ;
int main()
{
double map[10] ;
int flag = 0 ;
for( int i =0 ; i< 10 ; i++) cin >> map[i] ;
cin >> flag ;
sort(map ,map+10 ) ;
double ans = 0.0 ;
if(flag == 2 )
{
for( int i = 2 ; i< 8; i++) ans += map[i] ;
cout << (double) ans/ 6 << endl ;
}
else
{
for( int i = 1 ; i< 9 ;i++) ans += map[i] ;
cout << (double) ans/8 << endl ;
}
return 0 ;
}
*/