View Single Post
Old Feb 11th, 2007, 4:06 PM   #5
rsnd
Hobbyist Programmer
 
rsnd's Avatar
 
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4 rsnd is on a distinguished road
Quote:
Originally Posted by UnKnown X View Post
That's fairly tedious, though. Isn't there a quicker way, aside from the C-style printf()?
yeah...at the top of the program justa fter those std headers go:
using namespace std;

and then go:
cout << setprecision(1) << x << endl;



an even easier approach is coding your own fraction printing function.
__________________
Spread your wings and fly! Chicken!
rsnd is offline   Reply With Quote