Main.cc: In function 'int main()': Main.cc:6:5: error: 'cin' was not declared in this scope cin>>n>>m; ^ Main.cc:23:5: error: expected ';' before 'printf' printf("%.2lf",answer); ^