precision

Started by
2 comments, last by jordi_0071 19 years ago
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); }
Advertisement
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;
nevermind i already got it!
wow your fast:P

This topic is closed to new replies.

Advertisement