Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using c++. Please make sure the cout statement is exactly as asked in the question. Any difference will result in an incorrect answer. I cant

Using c++. Please make sure the cout statement is exactly as asked in the question. Any difference will result in an incorrect answer. I cant seem to figure it out. Thanks :) image text in transcribed
image text in transcribed
Write a program that prompts the user to enter the average rainfall for each month of the year. Then, prompt the user to enter the actual amount of rainfall for each month of this year. Finally, print out a table, formatted to be left justified with a width of 20 spaces for each column, that displays the average amount of rainfall, the actual amount of rainfall, and the difference between the two for each month of the year. Your program should use arrays to hold the values for average monthly rainfall, actual monthly rainfall, and month name SAMPLE RUN #1: ./monthly-rainfall Interactive Session Hide Invisibles Enter-average-monthly . rainfall . for. January: 375 Enter-average . monthly . rainfall . for . February: 912 Enter.average.monthly rainfall.for March:7.02 Enter average-monthly. rainfall. for-April: 13.42 Enter.average monthly rainfall.for.May:2.01+ Enter average monthly rainfall.for June:0.00 Enter average monthly rainfall.for July:3.49 Enter average monthly.rainfall for August:15.72 Enter.average monthly.rainfall.for September : 12.17 Enter.average monthly.rainfal1. for.October:1.22 Enter average monthly rainfall.for.November:0.11 Enter average monthly.rainfall. for.December:1.11 Enter this.year's rainfal1. for.January 13.24 Enter-this . year' s . rainfall . for . February: 976+ Enter.this year's.rainfall.for.March:0.91 Enter.this.year's rainfall.for April:2.33 Enter this.year's rainfal1 for May:13.42 Enter this year's rainfall.for June:5.44 Enter this year's rainfall.for July:0.67 Enter.this year's rainfal1.for August:9.66 Enter-this year . . rainfall . for . septemberi 2 1 . 31

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions