foo.cc: In function 'int main()':
foo.cc:9:18: error: expected ')' before ';' token
for(i=3;i<=n;i++;)f[i]=f[i-1]+f[i-2];
^
foo.cc:9:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(i=3;i<=n;i++;)f[i]=f[i-1]+f[i-2];
^~~
foo.cc:9:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
for(i=3;i<=n;i++;)f[i]=f[i-1]+f[i-2];
^
foo.cc:9:19: error: expected primary-expression before ')' token
foo.cc:7:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~