Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It's an assignment.. Please do it as early as possible THEORY Assignment # 01 Submission Deadline: Thu, 18th October, 2018 at 11:59 pm | Total

image text in transcribed

It's an assignment.. Please do it as early as possible

THEORY Assignment # 01 Submission Deadline: Thu, 18th October, 2018 at 11:59 pm | Total Marks: 40 Directions: Please upload the solutions in PDF format on Google Classroom. Policy: Any assignment copied will be marked zero and the assignments discarded. Both the original and opied assignments will be treated equally Note: Make careful and intelligent decision about the datatypes of variables used in the programs. 1. By recent estimates, two-thirds of the people in the United States are overweight and about half of those are obese. This causes significant increases in illnesses such as diabetes and heart disease. To determine whether a person is overweight or obese, you can use a measure called the body mass index (BMI). The formula to calculate BMI is as follows Weight (k [Height(m))2 BMI Write an (a) algorithm, (b) make a flowchart and (c) convert that into a program that would do following (i) Ask user to input Weight (in Kilograms) and Height (in feet and inches). (i) Convert the Height into meters (Look out for conversion formula from internet). i Calculate and Display the BMI value according to the formula given above (10 Marks) 2. You can convert temperature from degrees Celsius to degrees Fahrenheit by multiplying by 9/5 and adding 32. Write a program that allows the user to enter a floating-point number representing degrees Celsius, and then displays the corresponding degrees Fahrenheit. (10 Marks) 3. On a certain day the British pound was equivalent to $1.487 U.S, the French franc was $0.172, the German deutschemark was $O.584, and the Japanese yen was $0.00955. Write a program that allows the user to enter an amount in dollars, and then displays this value converted to these four other monetary units. (10 Marks) 4. Pappasallis needs a program to calculate the number of slices a pizza of any size can be divided into. The program should perform the following steps: A) Ask the user for the diameter of the pizza in inches B) Calculate the number of slices that may be taken from a pizza of that size if each slice has an area of 14.125 square inches C) Display a message telling the number of slices The number of square inches in the total pizza can be calculated with this formula: Area # r2 where variable r is the radius of the pizza and is the Greek letter Pi. In your program set Pl with the value 3.14. Display the number of slices as a whole number (i.e., with no decimals). (10 Marks) Page 1 of 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

Understand why customers complain.

Answered: 1 week ago