fork download
  1. #include<stdio.h>
  2. void main()
  3. {
  4. int b[5],i,x=0,j=1,a[]={2,3,4,5,6};
  5. for(i=0;i<5;i++)
  6. {
  7. for(j=1;j<=2,j++)
  8. {
  9. b[x++]=a[i]*b[j];
  10. }
  11. for(;j<5;j++)
  12. {
  13. b[x++]=a[i]*b[j];
  14. }
  15. b[x++]=a[i]*a[j-1];
  16. }
  17. for(i=0;i<5;i++)
  18. printf("%d",b[i]);
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:2:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
 void main()
      ^~~~
prog.c: In function ‘main’:
prog.c:7:21: warning: left-hand operand of comma expression has no effect [-Wunused-value]
         for(j=1;j<=2,j++)
                     ^
prog.c:7:25: error: expected ‘;’ before ‘)’ token
         for(j=1;j<=2,j++)
                         ^
                         ;
stdout
Standard output is empty