Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <cs50.h>
  2. #include <stdio.h>
  3.  
  4. int main(void)
  5.  
  6. {
  7. printf("Give \n");
  8. int a = get_int();
  9.  
  10. int n = (a/25);
  11. int x = (a-(25*n));
  12. int m = (x/10);
  13. int y = (x-(10*m));
  14. int q = (y/5);
  15. int c = (y-(5*q));
  16.  
  17. printf ("25 is %i\n", n);
  18. printf ("10 is %i\n", m);
  19. printf ("5 is %i\n", q);
  20. printf ("1 is %i\n", c);
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement