The program that checks the BMI of a patient is given below:
<h3>THE CODE</h3>
#include <iomanip>
#include <iostream>
#include <math.h>
using namespace std;
// C++ program to illustrate
// how to calculate BMI
float BMI(float height, float weight)
{
float bmi = weight / pow(height, 2);
return bmi;
}
int main()
{
float height = 1.79832;
float weight = 70;
// Function call
float bmi = BMI(height, weight);
cout << "The BMI is " << setprecision(15) << bmi
<< " so ";
// Conditions to find out BMI category
if (bmi < 18.5)
cout << "underweight";
else if (bmi >= 18.5 && bmi < 24.9)
cout << "Healthy";
else if (bmi >= 24.9 && bmi < 30)
cout << "overweight";
else if (bmi >= 30)
cout << "Suffering from Obesity";
return 0;
}
// This code is contributed by aarohirai2616.
<h3>Output: </h3>
The BMI is 21.64532402096181 so Healthy
Read more about algorithms here:
brainly.com/question/24953880
#SPJ1
How many copies to print is one of several choices
you can indicate in the print dialog.
Answer:
True
Explanation:
While looping through, there can be times that you do not want your code to do anything in some situations. Let's say you loop through an array consists of four numbers (1, 2, 3, and 4). You want to print all the values except 2. Check the code written in Java below.
int [] numbers = {1, 2, 3, 4};
for(int number : numbers) {
if(number == 2) {
continue;
}
System.out.println(number);
}
Answer: c) Web 2.0
Explanation:
Web 2.0 is the technology that consist applications and websites for the people to interact and sharing information, activities, event and other materials through social media components like blog, social networking sites,wikis, podcast etc.
- Other options are incorrect because artificial intelligence, ERP(Enterprise resource planning) and XML(Extensible Markup Language) are not the tools that is used by users for interaction and communicating with the help of social media components.
- Thus, the correct option is option(c).