i am writting c++ programe and use the borland builderX to compile it.
how can I do the following:
float i = 3;
cout << i;
Output:
3.00
thanks!
Printable View
i am writting c++ programe and use the borland builderX to compile it.
how can I do the following:
float i = 3;
cout << i;
Output:
3.00
thanks!
use setwidth, do a search on this board....it has been asked many times.
isn't it setprecision?
Yeah, setprecision to two and use fixed, too.
thats what i ment :)Quote:
Originally posted by major_small
isn't it setprecision?
i figured that...
hmm... no code yet... maybe i'll get around to posting it if i feel like looking for it later...