1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
PIT_PIT [208]
3 years ago
12

Write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).

Computers and Technology
1 answer:
Galina-37 [17]3 years ago
8 0

Answer:

// here is code in C++(bmi.cpp).

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

float weight,height;

cout<<"enter the weight(in kilograms):";

//read the weight

cin>>weight;

cout<<"enter the height(in meters):";

//read the height

cin>>height;

// calculate the bmi

float bmi=weight/(pow(height,2));

// print the body-mass index with two decimal places

cout<<"BMI is: "<<fixed<<setprecision(2)<<bmi<<endl;

return 0;

}

Explanation:

Read the weight from user and assign it to variable "weight",read height and assign it to variable "height".Then find the body-mass index as (weight/height^2).Here weight  should be in kilograms and height should be in meters.

Output:

enter the weight(in kilograms):75

enter the height(in meters):1.8

BMI is: 23.15

You might be interested in
Which of the following is the most-polluting energy source?
ira [324]
The answer to your question is D. Coal.
7 0
4 years ago
Read 2 more answers
After an object has been instantiated, its methods can be accessed using the object's _____, a dot, and a method call
BigorU [14]
<span>After an object has been instantiated, its methods can be accessed using the object's identifier, a dot, and a method call.
</span>DOI stands for D<span>igital Object Identifier, to permanently identifies an article or document and link to it on the web and can be  </span><span>a string of numbers, letters and symbols.</span>
5 0
3 years ago
What is does the word multimedia mean?
Natasha_Volkova [10]
Your answer would be B. Media that combines text, images, animation, and sound.
You're welcome:)
3 0
3 years ago
Read 2 more answers
Which type of application architecture has a logic tier
LuckyWell [14K]

Answer:

hi

Explanation:

7 0
3 years ago
Read 2 more answers
Assume the number variable contains the number 1000.
Inga [223]

Answer:

Explanation:

We could get the four options for this particular example, but we must know what happens with the variable number the value 1000.

In this case, we are going to assume four scenarios:

1) n = n - n this is equal to 0

2) n = (n - n) + n = 1000

3) n = n * 2 = 2000

4) n = n * 3 = 3000

These are simple examples, we could get these options in different ways.

5 0
3 years ago
Other questions:
  • Consider the folloeing website URL:http://www.briannasblog.com. What does the "http://" represent?
    11·1 answer
  • Pixels are small dots in columns and rows that allow an image to be seen on a display screen.
    6·1 answer
  • What is the line tool used for in photoshop
    6·1 answer
  • What is illegal to search on the internet?
    5·1 answer
  • simpley convert the code below to assembly languageYour proof-of-study task is to hand-compile the code below into an assembly l
    11·1 answer
  • C programming:
    13·1 answer
  • The suffix of a web address denotes which type of organization it is affiliated with. For example, an .edu is what type of websi
    9·1 answer
  • Sniffer turns the NIC of a system to the promiscuous mode so that it listens to all the data transmitted on its segment. It can
    13·1 answer
  • Pls help I will give points
    7·1 answer
  • I WILL GIVS BRAINLIEST IF U ANSWER THIS
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!