fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. /* run this program using the console pauser or add your own getch, system("pause") or input loop */
  5.  
  6. int main(int argc, char *argv[]) {
  7.  
  8.  
  9. int a=0;
  10. int b=0;
  11. int c=0;
  12. int d=0;
  13.  
  14. for(;a<10;++a)
  15. {
  16. b++; printf("b=%d\n", b);
  17. ++c; printf("c=%d\n", c);
  18. d=b+c; printf("d=%d, c=%d, b=%d\n", d, b, c);
  19.  
  20. if(d>11)
  21. break;
  22. }
  23. printf("a=%d\n",a);
  24. return 0;
  25. }
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
b=1
c=1
d=2, c=1, b=1
b=2
c=2
d=4, c=2, b=2
b=3
c=3
d=6, c=3, b=3
b=4
c=4
d=8, c=4, b=4
b=5
c=5
d=10, c=5, b=5
b=6
c=6
d=12, c=6, b=6
a=5