Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write a while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
2. Write a while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user if he or she wishes to per- form the operation again. If so, the loop should repeat, otherwise it should terminate. 5. Write a loop that calculates the total of the following series of numbers: 1 2 3 30 30 29 28 1 + + + . 5. Average Rainfall Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period. 6. Miles to Kilometers Table Write a program that displays a table of distances in miles and their equivalent distances in kilometers, rounded to 2 decimal places. One mile is equivalent to 1.60934 kilometers. The table should be generated using a loop, and should include values in 10 mile increments from 10 to 80. 9. Ocean Levels Assuming the ocean's level is currently rising at about 1.6 millimeters per year, create an application that displays the number of millimeters that the ocean will have risen each year for the next 25 years

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

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions