Advertisement
Radoan_Ahmed

Untitled

Oct 12th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.57 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.     a=n/100;
  8.     printf("%d nota(s) de R$ 100,00\n",a);
  9.     b=n%100;
  10.     a=b/50;
  11.     printf("%d nota(s) de R$ 50,00\n",a);
  12.     b=b%50;
  13.     a=b/20;
  14.     printf("%d nota(s) de R$ 20,00\n",a);
  15.     b=b%20;
  16.     a=b/10;
  17.     printf("%d nota(s) de R$ 10,00\n",a);
  18.     b=b%10;
  19.     a=b/5;
  20.     printf("%d nota(s) de R$ 5,00\n",a);
  21.     b=b%5;
  22.     a=b/2;
  23.     printf("%d nota(s) de R$ 2,00\n",a);
  24.     b=b%2;
  25.     a=b/1;
  26.     printf("%d nota(s) de R$ 1,00\n",a);
  27.     b=b%1;
  28.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement