1. Engineering
  2. Computer Science
  3. please use the quotcquot program toproduce the exact output shown...

Question: please use the quotcquot program toproduce the exact output shown...

Question details

Please use the "C" program toProduce the EXACT output shown at the end of the document.

1. Generate a graph that compares, on a month-by-month basis, the monthly rainfall for Kamloops for the first half of 2018 (i.e. Jan – June) versus the normal (30 year average) rainfall for Kamloops for the same months.

2. Create and call a function to return the month name to main()

  1. Create and call ONE function to print one line of symbols.
    • call it the first time to print the line of *
    • call it a second time to print the line of !
    • no if statement is needed or allowed in this function
    • Think very carefully about the parameter list for this function

4. Call a function to print the scale and the legend as shown below.

5. Call a function to find and print the total rainfall for each data set, and also the comparison of the two totals. The function will state whether 2018 was wetter, drier, or equal to a normal 6 month rainfall and by how much.

6. Call a function to determine which month in 2018 had the highest rainfall, and print the month name (using the function described in #2), the rainfall amount and how that amount compares to the normal amount for that month.

Input will consist of 6 pairs of numbers representing the normal rainfall for the month and the 2018 rainfall amount for the same month. Use the exact data shown below when you run your program, (Note: the data and output below are for illustration purposes only. Your program must be able to work with any data that has this format)

  1. 3.1 5.4       ¬ January data (normal first, then 2018)
  2. 4.7   4.4      ¬ February data
  3. 4.2 4.1
  4. 5.0 6.0
  5. 4.0    5.6
  6. 6.3    4.5

Rainfall comparison for January to June 2018

       January    |***********

|!!!!!!!!!!!!!!!!!!!!!!!!!

|

February |***************

|!!!!!!!!!!!!!!!!!!!!!

|

March | etc for the rest of the months

|

        June      |*****************

|!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

|----1----2----3----4----5----6----7----8

LEGEND:

* - normal rainfall for a given month

! - 2018 rainfall for a given month

Total normal rainfall was xx.x mm.

Total rainfall for 2018 was yy.y mm.

2018 was a drier year than normal by z.z mm. (or print wetter or equal if that is appropriate)

The month with the highest rainfall was …

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution