Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 10 pages
Other

Matric Certificate Emulation Program

Document preview thumbnail
Preview 2 out of 10 pages

The above assignment deals with units 17 - 23 The program code deals with an emulation program of a matric certificate that informs a student whether they have made it to university or not

Content preview

12596388 Shivam Naik COS1511 Assignment 3 Unique Code 830235




Question 1: COS1511 Assignment 3 BMI Calculator
Output:




Input:
#include <iostream>



using namespace std;



float getData(float &mass,float &height)

{

cout<<"Enter your mass in kilograms(kg): "<<endl<<endl;

cin>>mass;



cout<<"Enter your height in metres (m): "<<endl<<endl;

cin>>height;

return mass;

return height;

}



float calcBMI(float &mass,float &height)



{

float BMI;

, 12596388 Shivam Naik COS1511 Assignment 3 Unique Code 830235


float Square_height=height*height;




cout .setf(ios::fixed);

cout .precision(2);




BMI=mass/Square_height;



cout<<"Your BMI(Body Mass Index) in kg/m2 is: "<<BMI;



return BMI;

}



float displayFitnessResults(float &m,float &h, float &BMI)

{



if(BMI<18.5)

{



cout<<"Result of BMI:An Underweight Individual"<<endl<<endl;

cout<<"Please eat .........."<<endl<<endl;



}else if(BMI>=18.5&&BMI<=24.9)

{

cout<<"Result of BMI: Healthy Individual"<<endl<<endl;

cout<<"Continue the good work"<<endl<<endl;

}else if(BMI>=25.0&&BMI<=29.9)

{

cout<<"Result of BMI: An overweight individual"<<endl<<endl;

cout<<"Start Exercising and cutting off carbohydrates and saturated
,trans fats"<<endl<<endl;

}else if (BMI>30.0)

{

cout<<"Result of BMI:Obese ,Health emergency!"<<endl<<endl;

Document information

Uploaded on
November 9, 2022
Number of pages
10
Written in
2022/2023
Type
Other
Person
Unknown
$8.50

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
shivamnaik
5.0
(1)
Sold
6
Followers
2
Items
15
Last sold
1 year ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions