// setprecision example
#include <iostream>
#include <iomanip>
usingnamespace std;
int main () {
double f =3.14159;
cout << setprecision (5) << f << endl;
cout << setprecision (9) << f << endl;
cout << fixed;
cout << setprecision (5) << f << endl;
cout << setprecision (9) << f << endl;
return 0;
}
i copy this code from the tutorial from the forum thee question is what if i only want 1 digit to the right of the decimal point? im' not telling u to make setprecision (2) i want to make it for any number.