S001-AC.cc
1.42 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int e,c;
cin >> e;
cin >> c;
int quinientos = e / 500;
e -= quinientos*500;
int doscientos = e / 200;
e -= doscientos*200;
int cien = e / 100;
e -= cien*100;
int cincuenta = e / 50;
e -= cincuenta*50;
int veinte = e / 20;
e -= veinte*20;
int diez = e / 10;
e -= diez*10;
int cinco = e / 5;
e -= cinco*5;
int dos = e / 2;
e -= dos*2;
int uno = e;
int cincuentac = c / 50;
c -= cincuentac*50;
int veintec = c / 20;
c -= veintec*20;
int diezc = c / 10;
c -= diezc*10;
int cincoc = c / 5;
c -= cincoc*5;
int dosc = c / 2;
c -= dosc*2;
int unoc = c;
cout << "Banknotes of 500 euros: " << quinientos << endl;
cout << "Banknotes of 200 euros: " << doscientos << endl;
cout << "Banknotes of 100 euros: " << cien << endl;
cout << "Banknotes of 50 euros: " << cincuenta << endl;
cout << "Banknotes of 20 euros: " << veinte << endl;
cout << "Banknotes of 10 euros: " << diez << endl;
cout << "Banknotes of 5 euros: " << cinco << endl;
cout << "Coins of 2 euros: " << dos << endl;
cout << "Coins of 1 euro: " << uno << endl;
cout << "Coins of 50 cents: " << cincuentac << endl;
cout << "Coins of 20 cents: " << veintec << endl;
cout << "Coins of 10 cents: " << diezc << endl;
cout << "Coins of 5 cents: " << cincoc << endl;
cout << "Coins of 2 cents: " << dosc << endl;
cout << "Coins of 1 cent: " << unoc << endl;
return 0;
}