这是离AC最接近的用C++解题了(快要)
原题链接:30519.【PY】很不简单的一道题目2024-11-15 15:48:05
发布于:湖南
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b;
cin>>a>>b;
double sum = a + b;
double diff = a - b;
double product = a * b;
double quotient = a/b;
static_cast<double>(a) / b;
cout << fixed << setprecision(1) << sum << endl;
cout << fixed << setprecision(1) << diff << endl;
cout << fixed << setprecision(1) << product << endl;
cout << fixed << setprecision(1) << quotient << endl;
return 0;
}
全部评论 1
太棒了
2025-01-05 来自 湖南
1
有帮助,赞一个