Advertisement
Radoan_Ahmed

Untitled

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