Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Problem

Write a program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months. The program then prints out a nicely formatted table showing the rainfall for each of the previous 12 months as well as how much above or below average the rainfall was for each month. The average monthly rainfall is given for the months January, February, and so forth, in order. To obtain the actual rainfall for the previous 12 months, the program first asks what the current month is and then asks for the rainfall figures for the previous 12 months. The output should correctly label the months. There are a variety of ways to deal with the month names. One straightforward method is to code the months as integers and then do a conversion before doing the output. A large switch statement is acceptable in an output function. The month input can be handled in any manner you wish, as long as it is relatively easy and pleasant for the user. After you have completed the above program, produce an enhanced version that also outputs a graph showing the average rainfall and the actual rainfall for each of the previous 12 months. The graph should be similar to the one shown in Display 5.4, except that there should be two bar graphs for each month and they should be labeled as the average rainfall and the rainfall for the most recent month. Your program should ask the user whether she or he wants to see the table or the bar graph, and then should display whichever format is requested. Include a loop that allows the user to see either format as often as the user wishes until the user requests that the program end.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92788960

Have any Question?


Related Questions in Computer Engineering

Question 1you want a list of products whose product lines

Question 1 You want a list of products whose product lines contain the term  Classic  or  Vintage.  please pick up best option from the following. a. SELECT productline FROM products WHERE MATCH(productline) AGAINST('Cla ...

Show how an 8x1 multiplexer can be constructed from 4x1

Show how an 8x1 multiplexer can be constructed from 4x1 multiplexers and 2x1 multiplexers and no logic gates.

Suppose a finite deck of numeric cards 1 2 3 have been

Suppose a finite deck of numeric cards 1, 2, 3, ... have been shuffled randomly. Repeat the following step: If the top card is numbered 1, the game terminates. But if it is any number n > 1, then reverse the ordering of ...

Write a program that populates an array named weekday from

Write a program that populates an array named weekday from the string SunMonTueWedThuFriSat, and then prints each day in uppercase. PERL Language

Problem a design a 64kb 8-way set associative cache that

Problem : A. Design a 64KB 8-way set associative cache that has 32 words per blocks and 4 bytes per word (MIPS type). Assume a 32 bit address. a) Calculate the following a How many bits are used for the byte offset? b) H ...

Question state the dilemma the score as he puts it harnish

Question : State the dilemma ("the score", as he puts it) Harnish finds between the Humean view and the Frege-Russell view of representation. Do you think a computational theory of mind is a viable alternative to these v ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Question what are some of the specifics of a dbms that must

Question : What are some of the specifics of a DBMS that must be taken into consideration when building a database design? The response must be typed, single spaced, must be in times new roman font (size 12) and must fol ...

A sample of 36 us households is taken and the average

A sample of 36 U.S. households is taken and the average amount of newspaper garbage or recycling is found to be 27.8 pounds with a standard deviation of 2 pounds. Estimate, with 99% confidence, the mean amount of newspap ...

What are content management systems cms describe the

What are Content Management Systems (CMS). Describe the challenges in implementing and maintaining CMS. Can internet search engines be considered as Content Management Systems - explain your answer.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As