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 best describes professional behavior in the IT field?
Liono4ka [1.6K]
Option A. is the correct answer the other three are not professional behaviour if you would like an explanation as to why they are not just comment
7 0
2 years ago
Read 2 more answers
A computer understand..............codes.<br>​
KiRa [710]

Answer:Computers only understand machine code - they do not understand high-level language code. Any high-level programming language code has to be converted to executable code. Executable code is also known as machine code which is a combination of binary code 0s and 1s.

Explanation:

6 0
2 years ago
Endnotes are indicated by
V125BC [204]

Answer:

The answer is D because u have the uppercase letter bold

4 0
2 years ago
Read 2 more answers
Which logic gate produces an output of 1 only if both its inputs are 0
Anettt [7]

0=false

1=true

false + false = true

0+0=1

+ operator = and function

AND GATE

8 0
2 years ago
Read 2 more answers
explain the impact of effectively understanding the various formatting options available in the word processing software applica
Vera_Pavlovna [14]

The formatting tool is very important. When one effectively understands the various formatting options available in the word processing software application, one can be able to;

  • Make more accessible options for readers through creating and use of headings, highlighting key words or ideas etc.

  • Formatting any document helps one to have a  presentable and professional document.

  • It makes the document easier and a lot interesting to read.

  • It helps in Proper punctuation marks and spelling usefulness.

<h3>What is formatting in MS Word?</h3>

Formatting text is simply known as the act of controlling how one wants a particular text to appears in your document. This includes the control of the size, color, etc.

Learn more about word processing software  from

brainly.com/question/1022352

8 0
1 year ago
Other questions:
  • What does % find on edhesive??
    14·1 answer
  • What is the definition of legal intrusion
    14·1 answer
  • A relative path name defines a path from_________________________ Select one: a. from the UFD (user file directory) b. the curre
    6·1 answer
  • The ________ option contains the formatting and placeholders for all of the items that appear on a side.
    11·1 answer
  • Choose the term that describes each step of the cycle.
    13·1 answer
  • Borrowing money affects both assests and owners equity. True or false?​
    13·1 answer
  • What are the three main components of a for loop?
    9·1 answer
  • . Imagine that you were programming without an IDE. What problems might you encounter?​
    12·1 answer
  • The ______ Works on a single variable or constant. *​
    8·1 answer
  • A trace table is used for
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!