46

#include<cstdio>

int main(){
double n;
scanf("%lf", &n);
int a = n,b;
n = n - a;
b = a / 100;
printf("NOTAS:\n");
printf("%d nota(s) de R$100.00\n", b); a %= 100; b = a / 50; printf("%d nota(s) de R$ 50.00\n", b);
a %= 50;
b = a / 20;
printf("%d nota(s) de R$20.00\n", b); a %= 20; b = a / 10; printf("%d nota(s) de R$ 10.00\n", b);
a %= 10;
b = a / 5;
printf("%d nota(s) de R$5.00\n", b); a %= 5; b = a / 2; printf("%d nota(s) de R$ 2.00\n", b);
a %= 2;
b = a / 1;
printf("MOEDAS:\n");
printf("%d moeda(s) de R$1.00\n", b); a = 100 * n; //此处的a结果不对 printf("%d\n", a); b = a / 50; printf("%d moeda(s) de R$ 0.50\n", b);
a %= 50;
b = a / 25;
printf("%d moeda(s) de R$0.25\n", b); a %= 25; b = a / 10; printf("%d moeda(s) de R$ 0.10\n", b);
a %= 10;
b = a / 5;
printf("%d moeda(s) de R$0.05\n", b); a %= 5; b = a / 1; printf("%d moeda(s) de R$ 0.01\n", b);
return 0;
}


#include<cstdio>

int main(){
double n;
scanf("%lf", &n);
int a = n,b;
n = n - a;
b = a / 100;
printf("NOTAS:\n");
printf("%d nota(s) de R$100.00\n", b); a %= 100; b = a / 50; printf("%d nota(s) de R$ 50.00\n", b);
a %= 50;
b = a / 20;
printf("%d nota(s) de R$20.00\n", b); a %= 20; b = a / 10; printf("%d nota(s) de R$ 10.00\n", b);
a %= 10;
b = a / 5;
printf("%d nota(s) de R$5.00\n", b); a %= 5; b = a / 2; printf("%d nota(s) de R$ 2.00\n", b);
a %= 2;
b = a / 1;
printf("MOEDAS:\n");
printf("%d moeda(s) de R$1.00\n", b); a = 100 * n; //此处的a结果不对 printf("%d\n", a); b = a / 50; printf("%d moeda(s) de R$ 0.50\n", b);
a %= 50;
b = a / 25;
printf("%d moeda(s) de R$0.25\n", b); a %= 25; b = a / 10; printf("%d moeda(s) de R$ 0.10\n", b);
a %= 10;
b = a / 5;
printf("%d moeda(s) de R$0.05\n", b); a %= 5; b = a / 1; printf("%d moeda(s) de R$ 0.01\n", b);
return 0;
}