foo.c: In function 'main':
foo.c:7:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
scanf("%d",a[i]);
^
foo.c:7:17: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int' [-Wformat=]
foo.c:22:12: error: expected '(' before '{' token
for{j=i-1;j>=2;j--)
^
foo.c:22:20: warning: statement with no effect [-Wunused-value]
for{j=i-1;j>=2;j--)
~^~~
foo.c:22:27: error: expected ';' before ')' token
for{j=i-1;j>=2;j--)
^
foo.c:22:27: error: expected statement before ')' token
foo.c:37:1: error: expected declaration or statement at end of input
}
^