forked from gmendonca/uri-problem-solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1018.cpp
More file actions
25 lines (21 loc) · 610 Bytes
/
1018.cpp
File metadata and controls
25 lines (21 loc) · 610 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
#include <iostream>
using namespace std;
int main(){
int inteiro, aux;
cin >> inteiro;
cout << inteiro <<"\n";
cout << inteiro/100 << " nota(s) de R$ 100,00\n";
aux = (inteiro%100);
cout << aux/50 << " nota(s) de R$ 50,00\n";
aux = (aux%50);
cout << aux/20 << " nota(s) de R$ 20,00\n";
aux = (aux%20);
cout << aux/10 << " nota(s) de R$ 10,00\n";
aux = (aux%10);
cout << aux/5 << " nota(s) de R$ 5,00\n";
aux = (aux%5);
cout << aux/2 << " nota(s) de R$ 2,00\n";
aux = (aux%2);
cout << aux/1 << " nota(s) de R$ 1,00\n";
return 0;
}