foo.c: In function ‘main’:
foo.c:6:9: error: ‘cin’ undeclared (first use in this function)
6 | cin>>n>>endl;
| ^~~
foo.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
foo.c:6:17: error: ‘endl’ undeclared (first use in this function)
6 | cin>>n>>endl;
| ^~~~
foo.c:7:13: error: ‘inti’ undeclared (first use in this function); did you mean ‘int’?
7 | for(inti==1;i<=n;i++)
| ^~~~
| int
foo.c:7:21: error: ‘i’ undeclared (first use in this function)
7 | for(inti==1;i<=n;i++)
| ^
foo.c:7:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
7 | for(inti==1;i<=n;i++)
| ^~~
foo.c:9:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
9 | b=b+a;
| ^
foo.c:10:9: error: ‘cout’ undeclared (first use in this function)
10 | cout<<b;
| ^~~~