fork download
  1. // 16
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6. int a, n;
  7.  
  8. for (n = 1; n <= 10; n++) {
  9. if (n == 1) {
  10. a = -5;
  11. } else {
  12. a = a + 3;
  13. }
  14. printf("a%d = %d\n", n, a);
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.02s 1676KB
stdin
Standard input is empty
stdout
a1 = -5
a2 = -2
a3 = 1
a4 = 4
a5 = 7
a6 = 10
a7 = 13
a8 = 16
a9 = 19
a10 = 22