Question
For the following programs, define the outline (purpose, input, processing, and output), draw a hierarchy chart (at least one branch should go three levels deep),
For the following programs, define the outline (purpose, input, processing, and output), draw a hierarchy chart (at least one branch should go three levels deep), and explain the program using pseudocode (both high-level and detailed-level). When you are ready to turn-in the assignment, please convert it to PDF. The PDF file should follow the naming convention
1. The Earths ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program that computes and displays the number of centimeters and number of inches the oceans rose during this time. One millimeter is equivalent to 0.1 centimeters. One centimeter is equivalent to 0.3937 inches. The output of your program should be of this form:
The ocean rose X centimeters or Y inches in the last 100 years.
where X and Y are the two numbers your program calculated.
2. Write a program that asks for five test scores. The program should calculate the average test score and display it. The number displayed should be formatted in fixed- point notation, with one decimal point of precision. Here is one sample run:
Enter five test scores: 84 75 90 88 96 Average = 86.6
Note: The bold portion is what the user would type in.
3. Write a program that calculates the average rainfall for three months. The program should ask the user to enter the name of each month, such as June or July, and the amount of rain (in inches) that fell each month. The program should display a message similar to the following:
The average rainfall for June, July, and August is 6.72 inches.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started