Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 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. if(o!=n){
  13. printf("%d\n",o);//50
  14.  
  15. }
  16.  
  17. int cd = ab+50;//500+50=550
  18. if(n<cd){
  19. int p = (n-cd)/20;//576-550=26
  20. printf("%d\n",p);//20
  21. }
  22.  
  23.  
  24. int ef = cd+20;//550+20=570
  25. if(n<ef){
  26. int q = (n-ef)/10;//576-570=6
  27. printf("%d\n",q);//10
  28. }
  29. //int gh = (n-ef)/5;//570+5=575
  30. if(n<ef){
  31. int r = (n-ef)/5;//576-570=6
  32. printf("%d\n",r);//5
  33. }
  34. int gh = ef+5;//570+5=575
  35. if(n<gh){
  36. int s = (n-gh)/2;//576-575
  37. printf("%d\n",s);//2
  38. }
  39. if(n<gh){
  40. int t = (n-gh)/1;
  41. printf("%d",t);//1
  42. }
  43.  
  44.  
  45. }
  46.  
  47. printf("\n");
  48. return 0;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement