Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the Decomposition for this problem. Also include a listing of inputs and outputs. Finally, list the condition of when the loop will end
Write the Decomposition for this problem. Also include a listing of inputs and outputs. Finally, list the condition of when the loop will end and how you will determine what prints out to the user. Create a program using a loop that will analyze the amount of ran that fell during the 3 summer months of this year and last year. For each month the program needs to prompt the user for the amount of rain that fell this year and the amount of rain that fell last year. The program will then determine the difference. If the difference is negative then the program needs to print out "This year there was less rain by X inches.". Where X is the difference between this year and last year. If the difference is positive, the program needs to print out "This year there was more rain by X inches." Where X is, once again the difference. If the amount of rain that fell this year is the same as last year, have the program print out "No change."
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