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
Match each logical function with its description. AND COUNTIF SUMIF IF tests for a certain condition and returns one of two valu
lakkis [162]
1. IF
2. AND
3. COUNTIF
4. SUMIF
4 0
4 years ago
What other viruses, Trojans, worms, or malicious software were identified and quarantined by AVG within the Virus Vault
schepotkina [342]

Answer:

Exploit, trojan horse dropper

Explanation:

When using AVG AntiVirus Business Edition to scan a computer system, it is expected that the AntiVirus application will recognize the viruses, worms, Trojans, malware, and/or other malicious software that is present in an infected PC device.

These other viruses, Trojans, worms, or malicious software that were identified and quarantined by AVG within the Virus Vault are: Exploit, trojan horse dropper

5 0
3 years ago
How do i get my laptop to connect to wifi?​
Rina8888 [55]

Answer:

open your laptop go to the wifi or service icon. Look for your wifi and put in the password

4 0
3 years ago
Read 2 more answers
Answer quick plzzz I only have 2 hours
Nana76 [90]

Answer:

option 2

Explanation:

8 0
3 years ago
Read 2 more answers
Create a program that reads words.txt (link near top of our home page) in order to: determine the length of the longest word(s)
Alexeev081 [22]
# In Python 3
# https://pastebin.com/fPSmmE5w

longest = [""]
shortest = None


with open("words.txt") as words:
   for line in words.readlines():
       for word in line.split():
           if len(word) > len(longest[0]):
               longest = [word]
           elif len(word) == len(longest[0]):
               longest.append(word)
           elif shortest is None or len(word) < len(shortest[0]):
               shortest = [word]
           elif len(word) == len(shortest[0]):
               shortest.append(word)


def format_printable(words):
   return ["{}: {}".format(len(word), word) for word in words]


print(
   "Longest:\n",
   "\n".join(format_printable(longest)),
   "\nShortest:\n",
   "\n".join(format_printable(shortest)),
)
3 0
3 years ago
Other questions:
  • Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k ti
    8·1 answer
  • What happens when you send a fax to a phone?
    9·1 answer
  • Mrs. Johnson is here today to receive an intercostal nerve block to mitigate the debilitating pain of her malignancy. Her cancer
    13·1 answer
  • Taken together, the physical and data link layers are called the ____________________. Internet layer Hardware layer Internetwor
    15·1 answer
  • Which activity does not allow a person to perform any work while at the shop
    10·1 answer
  • A(n) _____ measures the ability to juggle a variety of demands, as in a manager's job where the candidate is presented with simu
    8·1 answer
  • When mehtod X calls method Y , method Y called methhod Z, and method Z calles method X, this is called
    9·1 answer
  • You can send emails to individuals from your address book.<br><br> True<br> False
    12·1 answer
  • Theo would like to apply formatting to record data based on values in comparison with values in other fields. Which option shoul
    7·2 answers
  • Prior to the 1996 NEC, ____ receptacles and cords were permitted. However, now it is mandatory that a separate equipment groundi
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!