fork download
  1. #include <stdio.h>
  2.  
  3. #define on 1
  4.  
  5. int main()
  6. {
  7. int a, b, i, wa = 0, seki = 1;
  8.  
  9. printf("a b=");
  10. scanf("%d %d", &a, &b);
  11. for (i = a; i <= b; i++) {
  12. wa += i;
  13. seki *= i;
  14. #if on
  15. printf("wa=%d seki=%d\n", wa, seki);
  16. #endif
  17. }
  18. printf("wa=%d seki=%d\n", wa, seki);
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 1680KB
stdin
3 6
stdout
a b=wa=3 seki=3
wa=7 seki=12
wa=12 seki=60
wa=18 seki=360
wa=18 seki=360