Main.cc: In function 'int main()': Main.cc:21:29: error: 'n' was not declared in this scope printf("%.2f%%\n",s018*1.0/n*100) ^