fork download
  1. #include <stdio.h>
  2.  
  3. main(void) {
  4. // your code goes here
  5. int m = 4620;
  6. int a = m / 1000;
  7. int b = m%1000/500;
  8. int c = m%1000%500/100;
  9. int d = m%1000%500%100/10;
  10. printf("%d\n", a);
  11. printf("%d\n", b);
  12. printf("%d\n", c);
  13. printf("%d\n", d);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
4
1
1
2