precision
what's wrong about this code?:
#include <iostream>
using namespace std;
int main()
{
float pi = 3.14159;
cout << "Pi: " << pi << endl;
cout.precision(3);
cout << "Pi with a precision of 3 numbers: " << pi endl;
return (0);
}
Quote:Original post by jordi_0071
cout << "Pi with a precision of 3 numbers: " << pi endl
}
cout << "Pi with a precision of 3 numbers: " << pi << endl;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement