Problem trivialmaths
User YSH2020
Submission Time 2025-02-21 10:13:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

trivialmaths.cpp: In function ‘float log_e(float)’:
trivialmaths.cpp:5:2: error: ‘cout’ was not declared in this scope
5 | cout << setprecision(0); float tmp = log(X);
| ^~~~
trivialmaths.cpp:2:1: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
1 | #include <cmath>
+++ |+#include <iostream>
2 | using namespace std;
trivialmaths.cpp:5:10: error: ‘setprecision’ was not declared in this scope
5 | cout << setprecision(0); float tmp = log(X);
| ^~~~~~~~~~~~