3841 - 1.5编写程序,显示计算结果
编写程序,显示
的结果
Input
此题无需输入
Output
输出计算结果 保留小数点后2位
Examples
Input
no input needed
Output
0.84
Solution C
#include <stdio.h> int main() {double res; res = (9.5*4.5-2.5*3)/(45.5-3.5); printf("%.2f",res); return 0; }
Solution C++
#include<iostream> using namespace std; int main() { cout.precision(2); cout << (9.5*4.5 - 2.5 * 3) / (45.5 - 3.5) << endl; getchar(); return 0; }