#include <iostream>
using std::cout;
using std::endl;
int main()
{
double d = 3.14;
cout.precision(3);
cout << "default: " << d << endl;
cout << "showpoint: " << std::showpoint << d << endl;
cout << "fixed: " << std::fixed << d << endl;
cout << "scientific: " << std::scientific << d << endl;
return 0;
}
/*
run:
default: 3.14
showpoint: 3.14
fixed: 3.140
scientific: 3.140e+00
*/