Main.cc: In function ‘int main()’:
Main.cc:15:5: error: ‘scanf’ was not declared in this scope
scanf("%d", &n);
^~~~~
Main.cc:19:5: error: ‘printf’ was not declared in this scope
printf("%.5f\n", result);
^~~~~~
Main.cc:19:5: note: suggested alternative: ‘int’
printf("%.5f\n", result);
^~~~~~
int