蓝桥杯 算法提高 P0101

一个水分子的质量是3.0*10-23克,一夸脱水的质量是950克。写一个程序输入水的夸脱数n(0 <= n <= 1e10),然后输出水分子的总数。
输入
  109.43
输出
  3.465283E+027

这题坑在输出,%E这个学到了,hhh

 1 //
 2 //  main.cpp
 3 //  lanqiao
 4 //
 5 //  Created by xyc on 2017/12/7.
 6 //  Copyright © 2017年 xyc. All rights reserved.
 7 //
 8 
 9 #include<iostream>
10 #include<string>
11 #include<string.h>
12 #include<math.h>
13 #include<algorithm>
14 #include<stdio.h>
15 #define MAX_N 20005
16 #define ll long long
17 
18 using namespace std;
19 
20 double n;
21 
22 int main()
23 {
24     cin>>n;
25     printf("%E
",n*(950.0/3.0)*pow(10,23));
26     return 0;
27 }
原文地址:https://www.cnblogs.com/Xycdada/p/8052424.html