Najmul_Kabir

banknotes

Aug 29th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int n;
  5. scanf("%d", &n);
  6. printf("%d\n", n);
  7. printf("%d nota(s) de R$ 100,00\n", n/100);
  8. n %= 100;
  9. printf("%d nota(s) de R$ 50,00\n", n/50);
  10. n %= 50;
  11. printf("%d nota(s) de R$ 20,00\n", n/20);
  12. n %= 20;
  13. printf("%d nota(s) de R$ 10,00\n", n/10);
  14. n %= 10;
  15. printf("%d nota(s) de R$ 5,00\n", n/5);
  16. n %= 5;
  17. printf("%d nota(s) de R$ 2,00\n", n/2);
  18. n %= 2;
  19. printf("%d nota(s) de R$ 1,00\n", n);
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment