The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Hi Mr.Ashish, I have an assignment need you to help relate to array in C++.
Â
CPP Exam Lab 02Spring 2017Arrays and FunctonsThis program will process mon±hly precipi±aton amoun±s and user reques±s.1.This program will process arrays of da±a ±o provide informaton ±o ±he user.2.Crea±e 5 functonsa.queryUser();i.prompts the user for an action and then returns an integer based on user choice1 to print all2 to calculate diFerences and print all3 to see a single month4 or more to quitb.processQuery (intquery,stringmonth[],doubleactual[],doubleaverage[],intsizeOfArrrays);i.checks the user query and calls a function based on the queryii.Use aswitch case1 calls printAllArrays2 calls calcAllDiFerences3 calls displaySingleMonthc.printAllArrays (stringmonth[],doubleactual[],doubleaverage[],intsizeOfArrrays);i.prints all the data in table form (see sample run)d.calcAllDiFerences (stringmonth[],doubleactual[],doubleaverage[],intsizeOfArrrays);i.calculates the monthly diFerence for each entry:actual - averageii.prints all the data in table form including the diFerence (see sample run)e.voiddisplaySingleMonth (stringmonth[],doubleactual[],doubleaverage[]);i.asks the user for a month to display (1 – 15)ii.remember these arrays are addressed 0 – 14iii.calculates the selected month diFerenceiv.prints the data in a single line form including the diFerence (see sample run)3.the main function willa.Crea±e 3 arrays…use ±he da±a from ±he char± belowi.Mon±h will hold ±he mon±h as a s±ringii.Ac±ual Rainfall will hold ac±ual rainfalliii.Average Rainfall will hold ac±ual rainfallOHRiley4/19/2017 11:27 a4/p4
Attachments:
-----------