Hai letto cosa avevo riportato nel post precedente?
However, this won't make floating-point "integers" print with a decimal point. It's necessary to use fixed for that effect.
codice:#include <iostream> #include <iomanip> using namespace std; int main() { double num = 129.146734689734698734698347; cout << setiosflags(ios::fixed) << setprecision(2) << num; return 0; }