I am new at programming using C++. I am trying to write a program where ouput needs to be formatted to fit certain decimal place criteria. I am using Visual Basic C++. The folowing is just some of the program I wrote:
cout << fixed << showpoint;
then some equations, then,
cout << setprecision(0) << htInches << " inches" << endl;
cout << setprecision(2) << htMeters << " meters" <<endl;
cout << setprecision(0) << htCentimeters<< " centimeters" << endl;
I am racking my brain trying to get this to work. I have been all through the book also. No help at all. Any help I can get would be appreciated. Thank you in advance.