myperror
presentation errorunknown
c_cpp
19 days ago
958 B
18
Indexable
Never
#include<iostream> #include<iomanip> #include<cmath> #include<string> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; int main() { float A, B; double C, D; cin >> A >> B; cin >> C >> D; printf("A = %.6f, B = %.6f\n", A, B); printf("C = %.6f, D = %.6f\n", C, D); cout << fixed << setprecision(1); cout << "A = " << A << ", B = " << B << endl; cout << "C = " << C << ", D = " << D << endl; cout << fixed << setprecision(2); cout << "A = " << A << ", B = " << B << endl; cout << "C = " << C << ", D = " << D << endl; cout << fixed << setprecision(3); cout << "A = " << A << ", B = " << B << endl; cout << "C = " << C << ", D = " << D << endl; cout << scientific << setprecision(3); cout << "A = " << A << ", B = " << B << endl; cout << "C = " << C << ", D = " << D << endl; cout << fixed << setprecision(0); cout << "A = " << A << ", B = " << B << endl; cout << "C = " << C << ", D = " << D << endl; return 0; }
Leave a Comment