Advertisement
PedroSG

Untitled

Apr 10th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.65 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3.  
  4. {
  5.     int N,not100,not50,not20,not10,not5,not2,not1;
  6.     scanf("%d",&N);
  7.     printf("%d\n",N);
  8.     not100 = N /100;
  9.     not50 = (N%100)/50;
  10.     not20 = (N%50)/20;
  11.     not10 = (N%20)/10;
  12.     not5 = (N%10)/5;
  13.     not2 = (N%5)/2;
  14.     not1 = (N%2)/1;
  15.          printf("%d nota(s) de R$ 100,00\n",not100);
  16.          printf("%d nota(s) de R$ 50,00\n",not50);
  17.          printf("%d nota(s) de R$ 20,00\n",not20);
  18.          printf("%d nota(s) de R$ 10,00\n",not10);
  19.          printf("%d nota(s) de R$ 5,00\n",not5);
  20.          printf("%d nota(s) de R$ 2,00\n",not2);
  21.          printf("%d nota(s) de R$ 1,00\n",not1);
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement