Closed ghost closed 7 years ago
using namespace std;
int main() { double num = 3.14159265; cout.precision(2); cout << num << endl; }
Prints 3.1 instead of 3.14 since it is using the default floating-point notation.
include
using namespace std;
int main() { double num = 3.14159265; cout.precision(2); cout << num << endl; }
Prints 3.1 instead of 3.14 since it is using the default floating-point notation.