Main.cc: In function 'int main()':
Main.cc:11:19: warning: for increment expression has no effect [-Wunused-value]
for(int i=1;;i<=n;i++){
^
Main.cc:11:22: error: expected ')' before ';' token
for(int i=1;;i<=n;i++){
^
Main.cc:11:23: error: 'i' was not declared in this scope
for(int i=1;;i<=n;i++){
^
Main.cc:9:14: warning: unused variable 'h' [-Wunused-variable]
double a,h;
^