-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe1.cpp
65 lines (58 loc) · 1.59 KB
/
e1.cpp
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
59
60
61
62
63
64
65
#include "../std_lib_facilities.h"
int main ()
{
for (char c = 'a'; c <= 'z'; c++)
{
constexpr int diff = 'A' - 'a';
cout << c << '\t' << int(c) << '\t' << char(c + diff) << '\t' << int(c + diff) << endl;
}
// constexpr double jpy = 0.0087;
// constexpr double eur = 1.13;
// constexpr double gbp = 1.34;
//
// double amount {0};
// char code;
//
// cout << "Enter dollar amount and currency code to convert" << endl;
// cout << "j for yen, e for euro and, p for british pounds and q to quit:" << endl;
//
// while (cin >> amount >> code)
// {
// switch (code)
// {
// case 'j':
// cout << "$" << amount << " = " << amount / jpy << " japanese yen." << endl;
// break;
// case 'e':
// cout << "$" << amount << " = " << amount / eur << " EURO." << endl;
// break;
// case 'p':
// cout << "$" << amount << " = " << amount / gbp << " British pounds." << endl;
// break;
// default:
// cerr << "Wrong currency." << endl;
// }
// cout << "Enter dollar amount and currency code to convert" << endl;
// cout << "j for yen, e for euro and, p for british pounds and q to quit:" << endl;
// }
// while (cin >> amount >> code)
// {
// if (code == "jpy")
// {
// cout << "$" << amount << " = " << amount / jpy << " japanese yen.";
// }
// else if (code == "eur")
// {
// cout << "$" << amount << " = " << amount / eur << " EURO.";
// }
// else if (code == "gbp")
// {
// cout << "$" << amount << " = " << amount / gbp << " British pounds.";
// }
// else
// {
// cerr << "Wrong currency." << endl;
// }
// cout << endl << "Enter dollar amount and currency code to convert:" << endl;
// }
}