fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int t,m,w,c1,c2,c3,temp,sol,rem;
  5. scanf("%d",&t);
  6. for(i=1;i<=t;i++)
  7. {
  8. c1=c2=c3=0;
  9. scanf("%d%d",&m,&w);
  10. temp=m;
  11. while(m>=7)
  12. {
  13. m-=7;
  14. c1++;
  15. }
  16. while(w>=7)
  17. {
  18. w-=7;
  19. c2++;
  20. }
  21. rem=m+w;
  22. while(rem>=7)
  23. {
  24. rem-=7;
  25. c3++;
  26. }
  27. sol=temp+c1+c2+c3;
  28. printf("%d\n",sol);
  29. }
  30. return 0;
  31. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
7 0
compilation info
prog.c: In function ‘main’:
prog.c:6:6: error: ‘i’ undeclared (first use in this function)
  for(i=1;i<=t;i++)
      ^
prog.c:6:6: note: each undeclared identifier is reported only once for each function it appears in
stdout
Standard output is empty