-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpretty.cpp
More file actions
58 lines (45 loc) · 1.24 KB
/
Copy pathpretty.cpp
File metadata and controls
58 lines (45 loc) · 1.24 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// #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;
// int num = A;
// char sign;
// if(B < 0){
// sign = '-';
// }else{
// sign = '+';
// }
// /* Enter your code here */
// cout << setprecision(0) << "0x" << hex << num << endl;
// cout << setfill('_') << setprecision(2) << B << endl;
// cout << setprecision(0) << C << endl;
// }
// return 0;
// }
#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;
cout << hex << setw(0) << setiosflags(ios::showbase) << resetiosflags(ios::uppercase);
cout << (long long)A << endl;
cout << right << setfill('_') << setw(15) << setprecision(2) << fixed << setiosflags(ios::showpos);
cout << B << endl;
cout << resetiosflags(ios::showpos) << setiosflags(ios::uppercase) << setprecision(9) << scientific;
cout << C << endl;
}
return 0;
}