I am a student and I have to finish my work but i cant set the program to show me only 3 decimal not 1.000000000000E+0.1 please let me know how it works.
Thanks
<b>Matias</b>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have and doesn't work!!!
program Natura;
var co: array [1..100] of integer;
pre: array [1..100] of real; Here i want only 3 decimal, where I have to puta that????
Thanks again and excuse my ignorance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dan's solution should work http://sourceforge.net/forum/message.php?msg_id=1777686 mine will as well, but i think he expressed his better. If you want me to show you where to put my extra code, I will have to see all of yours.
Curtis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am a student and I have to finish my work but i cant set the program to show me only 3 decimal not 1.000000000000E+0.1 please let me know how it works.
Thanks
<b>Matias</b>
Add these lines before your cout statement that has that number in it.
cout.setf(ios::fixed);
cout.precesion(3);
Curtis
I have and doesn't work!!!
program Natura;
var co: array [1..100] of integer;
pre: array [1..100] of real; Here i want only 3 decimal, where I have to puta that????
Thanks again and excuse my ignorance.
Dan's solution should work http://sourceforge.net/forum/message.php?msg_id=1777686 mine will as well, but i think he expressed his better. If you want me to show you where to put my extra code, I will have to see all of yours.
Curtis