Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- { int N1;
- scanf ("%d", &N1);
- // Com notas
- printf("%d\n", N1);
- printf("%i nota(s) de R$ 100,00\n", N1/100 );
- printf("%i nota(s) de R$ 50,00\n", (N1%100)/50);
- printf("%i nota(s) de R$ 20,00\n", (N1%100)%50/20);
- printf("%i nota(s) de R$ 10,00\n", (N1%100)%50%20/10);
- printf("%i nota(s) de R$ 5,00\n",(N1%100)%50%20%10/5);
- printf("%i nota(s) de R$ 2,00\n", (N1%100)%50%20%10%5/2);
- printf("%i nota(s) de R$ 1,00\n", (N1%100)%50%20%10%5%2/1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement