>>Enter Your Height In Feet And Inches: 5 4
use two variables, not one, something like this
int feet,inches
cin >> feet >> inches;
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
setw I think will do it
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
float n = 123.4567890F;
cout << setw(3) << n << "\n";
return 0;
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
u cn simply use BMI as a float variable...
float BMI;
tracethepath
Junior Poster in Training
54 posts since Jul 2007
Reputation Points: 8
Solved Threads: 4
Decimal places require float or double variables.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944