-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhr_pretty_print.cpp
More file actions
28 lines (26 loc) · 995 Bytes
/
Copy pathhr_pretty_print.cpp
File metadata and controls
28 lines (26 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int T; cin >> T;
cout << setiosflags(ios::uppercase);
cout << setw(0xf) << internal;
while(T--) {
double A; cin >> A;
double B; cin >> B;
double C; cin >> C;
/* Enter your code here */
cout << resetiosflags(ios_base::basefield | ios_base::adjustfield
| ios_base::floatfield | ios_base::showbase | ios_base::showpos
| ios_base::uppercase);
cout << setw(0) << hex << showbase << (long long)A << '\n';
cout << resetiosflags(ios_base::hex | ios_base::showbase);
cout << setw(15) << showpos << right << fixed << setfill('_')
<< setprecision(2) << B << '\n';
cout << resetiosflags(ios_base::basefield | ios_base::adjustfield
| ios_base::floatfield | ios_base::showpos);
cout << uppercase << scientific
<< setprecision(9) << setw(15) << C << '\n';
}
return 0;
}