Jstylez5507 Jstylez5507
  • 20-10-2020
  • Computers and Technology
contestada

. Write a C program that accepts the weight and height from the user. Calculate the BMI of the user and print the result based on the following rules: - If BMI < 20 then result

Respuesta :

justsomerandombloke
justsomerandombloke justsomerandombloke
  • 21-10-2020

Answer:

#include <stdio.h>

int main()

{

   double weight;

   double height;

   double bmi;

   

   printf("Enter your weight in KG: ");

   scanf("%lf", &weight);

   

   printf("Enter your height in meters: ");

   scanf("%lf", &height);

   

   bmi = (weight / (height * height));

   

   

   if (bmi < 20)

   {

       printf("Your BMI is %lf", bmi);

   }

   

   

   return 0;  

}

-----------

Hope I've helped

Answer Link

Otras preguntas

This woman was captured by Northern forces and eventually married a Union officer.
Organisms rely on both negative feedback processes and behavior to maintain what
what is the answer to 80x34
the Taj Mahal was built by this Emperor for a tomb
Valuable resources in both Egypt and Nubia included ___________. a. copper c. ore b. gold d. all of the above
A substance has a mass of 360 g and a volume of 7.5 cm3. What is its density?
“have” vs.“have got” in American and British English
Which term refers to the fluid between the plasma membrane and the nucleus? cytoplasm chloroplast ribosome vesicle
Which sequence is correct for these events? 1. Pilgrims land at Plymouth. 2. Fighting begins at Lexington and Concord. 3. Spanish conquest destroys Mesoam
Approximately what part of the American flag is blue?Explain.