## (solution) The Programming is in Dev C++ Notes: %lf is used for input /

The Programming is  in Dev C++

Notes: ? %lf is used for input / output of double variables. ? Use formatting freely but explain each one of your formats. ? Use the library for ? (=pi).

5. (Health application: computing BMI) Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. Write a program that prompts the user to enter a weight in pounds and height in inches and display the BMI. Note that one pound is 0.45359237 kilograms and one inch is 0.0254 meters.

3. (Converting pounds into kilograms) Write a program that converts pounds into kilograms. The program prompts the user to enter a number in pounds, converts it to kilograms, and displays the result. One pound is 0.454 kilograms.

2. (Computing the volume of a cylinder) Write a program that reads in the radius and length of a cylinder and computes volume using the following formulas: area = radius * radius * ? volume = area * length

1. (Converting Celsius to Fahrenheit) Write a program that reads a Celsius degree in double from the console, then converts it to Fahrenheit and displays the result. The formula for the conversion is as follows: fahrenheit = (9 / 5) * celsius + 32

4. (Finding the number of years) Write a program that prompts the user to enter theminutes (e.g., 1 billion) and displays the number of years and days for the minutes. For simplicity, assume a year has 365 days.
CSC131 ? PROGRAMMING PRINCIPLES I

ASSIGNMENT 1

Instructor: E. Stylianou Instructions:

Programming: Write the following programs using C language. Each program should

properly indented code and use comments properly.

Submission: Submit you .c files (programs) through moodle in a .zip folder with name

your initials and studentID and name of the assignment e.g es987865_assign1.zip .

Do not include in the folder the executable files (.exe). Exercises:

1. (Converting Celsius to Fahrenheit) Write a program that reads a Celsius degree in

double from the console, then converts it to Fahrenheit and displays the result. The

formula for the conversion is as follows:

fahrenheit = (9 / 5) * celsius + 32

2. (Computing the volume of a cylinder) Write a program that reads in the radius and

length of a cylinder and computes volume using the following formulas:

volume = area * length

3. (Converting pounds into kilograms) Write a program that converts pounds into

kilograms. The program prompts the user to enter a number in pounds, converts it to

kilograms, and displays the result. One pound is 0.454 kilograms.

4. (Finding the number of years) Write a program that prompts the user to enter the

minutes (e.g., 1 billion) and displays the number of years and days for the minutes.

For simplicity, assume a year has 365 days.

5. (Health application: computing BMI) Body Mass Index (BMI) is a measure of health

on weight. It can be calculated by taking your weight in kilograms and dividing by the

square of your height in meters. Write a program that prompts the user to enter a

weight in pounds and height in inches and display the BMI. Note that one pound is

0.45359237 kilograms and one inch is 0.0254 meters. Notes: %lf is used for input / output of double variables.

Use formatting freely but explain each one of your formats.

Use the &lt;math.h&gt; library for ? (=pi).

Solution details:
STATUS
QUALITY
Approved

This question was answered on: Jan 30, 2021 Solution~0001001220.zip (25.37 KB)

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free solution (Deadline assured. Flexible pricing. TurnItIn Report provided)

##### Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .

STATUS

QUALITY

Approved

Jan 30, 2021

EXPERT

Tutor 