fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a, b, ghai, thia, ghul, thul;
  5. scanf("%d", &a);
  6. b=a;
  7. thul=0;
  8. ghul=0;
  9. for(ghai=4; ghai>b ;b=b-4){
  10. ghul=ghul+1;
  11. }
  12. for(thia=2; b>0; b=b-2){
  13. thul=thul+1;
  14. }
  15. printf("%d\n%d", ghul, thul);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5320KB
stdin
10
stdout
0
5