five cost
head File:
#include <iomanip>
#include <iostream>
Specify the number of decimal places:
cout.flags(ios::fixed); cout.precision(4); cout << 1.23456 << endl;
cout.setf(ios::fixed); cout << setprecision(4) << 1.23456<< endl;
head File:
#include <iomanip>
#include <iostream>
Specify the number of decimal places:
cout.flags(ios::fixed); cout.precision(4); cout << 1.23456 << endl;
cout.setf(ios::fixed); cout << setprecision(4) << 1.23456<< endl;