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 type of classroom enable students to attend lectures without being physically present with the teacher
nadezda [96]

A browser-based, virtual classroom with a facility of web conferencing platform developed for teaching online.

It can create the online school, manage courses of studies and users and make face to face interaction between the teacher and the student.

An approach is different than some of the other platforms out there as the motive is to deliver a platform that presents your classes, workshops and tutoring sessions in a modern, professional way.

Live virtual classrooms enable students to attend lectures without being physically present in the classroom

--

6 0
3 years ago
Read 2 more answers
Var words = ["apple", "bug","car", "dream", "ear", "food"]
irina [24]

Answer:

B

Explanation:

I haven't taken cs principles, but i have taken cs a

is that python?

bug, car, ear are the only words less than 4 characters in legnth

5 0
3 years ago
Read 2 more answers
Tyra is peer conferencing about her project with a friend. Tyra's friend provided feedback that Tyra does not agree with. What s
natulia [17]

Answer:

Be kind and thankful

Explanation:

If Tyra does not agree with her friend's feedback, she does not have to say it outrightly to her friend. She has to use softer words to disagree. This is where being kind comes in.

Her friend has made efforts by providing this feedback Even if it is not exactly what she wants to hear. It would be polite for her to say thank you.

Then she has to respectfully disagree to avoid coming off as someone who is totally unreceptive of the opinion of others.

6 0
2 years ago
Create a function names minElement() that takes an array of numbers as a paaramter and returns the min value of the array. The a
Vika [28.1K]

Answer:

#include<iostream>

using namespace std;

//create the function

int minElement(int arr[],int n){

   int minimum = arr[0];  //store the first value of array

   //for loop for iterate the each element

   for(int i=0;i<n;i++){

       if(arr[i]<minimum){   //compare

           minimum=arr[i];

       }

   }

   return minimum;

}

int main(){

   int arr[]={4,1,7,9,2,6};

   int array_size = 6;

   int result = minElement(arr,array_size);   //calling

   cout<<"The min value is: "<<result<<endl;

}

Explanation:

First include the library iostream in the c++ programming for input/output.

then, create the function minElement() for find the minimum value in the array.

it required the one loop for iterate the each element in the array and then compare with first element in the array which is store in the variable minimum.

if array element is less than the minimum then, update the value in the minimum variable.

after complete the loop, return the result.

for capture the result create the main function and call the function with parameter array.

and finally display the result.

8 0
3 years ago
What does NOT match with Agile Manifesto?
Butoxors [25]

Answer:

yes

Explanation:

7 0
3 years ago
Other questions:
  • In the following statement:
    12·1 answer
  • What are pixels that are the exact same between multiple frames called?
    15·1 answer
  • In this assignment, you are going to add conditional formatting to the spreadsheet you used in the previous
    13·1 answer
  • Litmus-type test strips are used to test coolant for freeze protection and ?
    12·1 answer
  • Of the two basic methods of data entry, keyboards use keystrokes to enter data and instructions; what is the nonkeyboard method
    8·1 answer
  • Create a calendar named fitness and then display it in a calendar view with the default calendar.
    15·1 answer
  • Microprocessors can’t directly understand programming languages, so programs have to be converted into _____________ that corres
    15·1 answer
  • Because it takes time to change an organization’s culture, the ISO must continually monitor security policy compliance. The ISO
    9·1 answer
  • How to measure potential energy of a ball?
    14·1 answer
  • 5.7 AP-Style MC Practice edhessive
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!