Professional Documents
Culture Documents
Body Mass Index (BMI) Calculator: Motaz Malik Lab Test 1 29/3/2016 Matric No. LSEZ4-09/15-00027 Programming 1 IPR1263
Body Mass Index (BMI) Calculator: Motaz Malik Lab Test 1 29/3/2016 Matric No. LSEZ4-09/15-00027 Programming 1 IPR1263
Body Mass Index (BMI) Calculator: Motaz Malik Lab Test 1 29/3/2016 Matric No. LSEZ4-09/15-00027 Programming 1 IPR1263
Lab Test 1
Programming 1
#include<iostream>
#include<iomanip>
#include<math.h>
int main()
{
float weight;
float height;
float bmi;
char response;
do
{
cout << "*****************************\n";
cout << "Please enter your weight (KG): ";
cin >> weight;
cout << "Please enter your height (Meters): ";
cin >> height;
bmi = (weight / pow(height,2)) ;
cout<<"\n";
29/3/2016
IPR1263
Motaz Malik
Matric No. LSEZ4-09/15-00027
Lab Test 1
Programming 1
cin.get();
cout << endl;
cout << "Would you like to enter the information again? ";
cin >> response;
}
while (toupper(response) == 'Y');
cout << "Okay, see you next time.." << endl;
return 0;
}
29/3/2016
IPR1263
Motaz Malik
Matric No. LSEZ4-09/15-00027
LOOPING OF PROGRAM
Lab Test 1
Programming 1
29/3/2016
IPR1263