This commit is contained in:
flykhan 2023-03-24 11:51:38 +08:00
parent 51edac9f6d
commit 0b07514acb
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#include <cstdio>
int main()
{
int total_money;
scanf("%d", &total_money);
printf("%d\n", total_money);
printf("%d nota(s) de R$ 100,00\n", total_money / 100);
printf("%d nota(s) de R$ 50,00\n", total_money % 100 / 50);
printf("%d nota(s) de R$ 20,00\n", total_money % 100 % 50 / 20);
printf("%d nota(s) de R$ 10,00\n", total_money % 100 % 50 % 20 / 10);
printf("%d nota(s) de R$ 5,00\n", total_money % 100 % 50 % 20 % 10 / 5);
printf("%d nota(s) de R$ 2,00\n", total_money % 100 % 50 % 20 % 10 % 5 / 2);
printf("%d nota(s) de R$ 1,00\n", total_money % 100 % 50 % 20 % 10 % 5 % 2);
return 0;
}