-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2758.cpp
More file actions
22 lines (20 loc) · 996 Bytes
/
Copy path2758.cpp
File metadata and controls
22 lines (20 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
int main() {
float a, b;
double c, d; // to cansando de usar abc e xyz :(
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cout << fixed << setprecision(6) << "A = " << a << ", B = " << b << endl << "C = " << c << ", D = " << d << endl;
cout << fixed << setprecision(1) << "A = " << a << ", B = " << b << endl << "C = " << c << ", D = " << d << endl;
cout << fixed << setprecision(2) << "A = " << a << ", B = " << b << endl << "C = " << c << ", D = " << d << endl;
cout << fixed << setprecision(3) << "A = " << a << ", B = " << b << endl << "C = " << c << ", D = " << d << endl;
cout << fixed << setprecision(3) << scientific << uppercase << "A = " << a << ", B = " << b << endl << "C = " << c << ", D = " << d << endl;
cout << fixed << setprecision(0) << "A = " << a << ", B = " << b << endl << "C = " << c << ", D = " << d << endl;
return 0;
}