Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n;
  5. scanf("%d",&n);
  6. if(n!=NULL){
  7. int m = n/100;
  8.  
  9. printf("%d\n",m);//100
  10. int ab = m*100;
  11. int o = (n-ab)/50;//576-500=76
  12. printf("%d\n",o);//50
  13. int cd = ab+50;//500+50=550
  14. int p = (n-cd)/20;//576-550=26
  15. printf("%d\n",p);//20
  16. int ef = cd+20;//550+20=570
  17. int q = (n-ef)/10;//576-570=6
  18. printf("%d\n",q);//10
  19. int r = (n-ef)/5;//576-570=6
  20. printf("%d\n",r);//5
  21. int gh = ef+5;//570+5=575
  22.  
  23. int s = (n-gh)/2;//576-575
  24. printf("%d\n",s);//2
  25.  
  26.  
  27. int t = (n-gh)/1;
  28. printf("%d",t);//1
  29.  
  30.  
  31.  
  32. }
  33.  
  34. printf("\n");
  35. return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement