Main.cc: In function 'int main()': Main.cc:18:24: error: 'i' was not declared in this scope printf("%d%.2lf\n",i,ac); ^