Advertisement
RAJIBRAJU

uri1018

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