I am new in C++ , i just want to output my point number up to 2 digits. just like if number is 3.444, then the output should be 3.44 o
C++
3.444
3.44
#include #include int main() { double num1 = 3.12345678; std::cout << std::fixed << std::showpoint; std::cout << std::setprecision(2); std::cout << num1 << std::endl; return 0; }