Greetings!
I'd like to know how to format Real Type numbers in C++.
If I have a number like 1.23456, how can I?:
truncate it to: 1.234
round it to: 1.235
or 1.75 expressed like 1.7500
using cout.
Also, if I have one floating number like 1.2345600E05, how can I show it like an integer 123456 using cout too?
Thanks in advance!
Real Type Format.
Moderator: Board moderators
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
Thanks!
Thanks Krzysztof!
I followed your suggestion, and found really useful information here:
http://www.minich.com/education/psu/cpl ... 1notes.htm
http://facultyfp.salisbury.edu/taanasta ... eamio.html
Thanks!, keep posting!
I followed your suggestion, and found really useful information here:
http://www.minich.com/education/psu/cpl ... 1notes.htm
http://facultyfp.salisbury.edu/taanasta ... eamio.html
Thanks!, keep posting!
_.