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
Answer:
</p><p>
</p><p>days1(); // calling function days1()
</p><p>
</p><p>function days1() // function days1
</p><p>
</p><p>{
</p><p>
</p><p>var week = ["sunday ", "monday ", "tuesday "," wednesday"," thursday",
</p><p>
</p><p>"friday"," saturday"];
</p><p>
</p><p>var i;
</p><p>
</p><p>for (i=0;i<7;i++) // iterating over the loop
</p><p>
</p><p>{
</p><p>
</p><p>document.write(" The number of days in a week :" +</br>);
</p><p>
</p><p>document.write( week[i] + "</br>" ); // print the number of days
</p><p>
</p><p>}
</p><p>
</p><p>}
</p><p>
</p><p>
Output:
The number of days in a week :
sunday
monday
tuesday
wednesday
thursday
friday
saturday
Explanation:
In this program, we create a function days1().In this function, we declared an array i.e " week " which will store the list of the days of the week. After that, we iterate the for loop and prints a list of the days of the week.
A _______ is a computer running software that allows it to share resources over a network. it may share programs or data.
C. Server
Answer:
To source for the needed information
Dog is the base class and poodle is the derived class.