-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1021.cpp
More file actions
35 lines (35 loc) · 886 Bytes
/
Copy path1021.cpp
File metadata and controls
35 lines (35 loc) · 886 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
29
30
31
32
33
34
35
#include<bits//stdc++.h>
int main()
{
float a,b,c;
int N,x,m;
scanf("%f",&a);
N=(int)a;
b=a-N;
printf("NOTAS:\n");
printf("%d nota(s) de R$ 100.00\n",N/100);
N=N%100;
printf("%d nota(s) de R$ 50.00\n",N/50);
N=N%50;
printf("%d nota(s) de R$ 20.00\n",N/20);
N=N%20;
printf("%d nota(s) de R$ 10.00\n",N/10);
N=N%10;
printf("%d nota(s) de R$ 5.00\n",N/5);
N=N%5;
printf("%d nota(s) de R$ 2.00\n",N/2);
N=N%2;
printf("MOEDAS:\n");
printf("%d moeda(s) de R$ 1.00\n",N);
m=round(b*100);
printf("%d moeda(s) de R$ 0.50\n",m/50);
m=m%50;
printf("%d moeda(s) de R$ 0.25\n",m/25);
m=m%25;
printf("%d moeda(s) de R$ 0.10\n",m/10);
m=m%10;
printf("%d moeda(s) de R$ 0.05\n",m/5);
m=m%5;
printf("%d moeda(s) de R$ 0.01\n",m/1);
return 0;
}