Sign in to follow this  
jordi_0071

precision

Recommended Posts

jordi_0071    138
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); }

Share this post


Link to post
Share on other sites
choffstein    1090
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;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this