From 699f8c0333dab795b20a6e1617e94039049e9f86 Mon Sep 17 00:00:00 2001 From: ltg001 <1071629548@qq.com> Date: Fri, 1 Dec 2017 00:15:25 +0800 Subject: [PATCH] Create charpter5(1).txt --- charpter5(1).txt | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 charpter5(1).txt diff --git a/charpter5(1).txt b/charpter5(1).txt new file mode 100644 index 0000000..58ca73f --- /dev/null +++ b/charpter5(1).txt @@ -0,0 +1,74 @@ +A.温度转换 +/* +#include +#include +#include +#include +using namespace std ; +int main() +{ + double a ,b ; + cin >> a ; + cout << (double)(a-32.0)/1.8 << endl ; + return 0 ; +} +*/ + +B.数字分离 +/* +#include +#include +#include +#include +#include +using namespace std ; + +int main() +{ + stack 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 +#include +#include +#include +#include +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 ; +} +*/