Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To be coded in C as simple as possible. also, please leave at least one spacing in the scale. --------------------Previous code below -------------------------------- // one

To be coded in C as simple as possible. also, please leave at least one spacing in the scale.

image text in transcribedimage text in transcribed

--------------------Previous code below --------------------------------

// one function to print the lines of symbols void oneFunction(int size, char c) { for (int i = 0; i  a[hRF]) { hRF = i; } } return hRF; } int main() { // Variable for total rainfall double rainAmt2018; //initialization lists for the normal rainfall, total rainfall and months. double monthlyRainF[] = {3.1, 4.7, 4.2, 5.0, 4.0, 6.3}; double rainAmount2018[] = {5.4, 4.4, 4.1, 6.0, 5.6, 4.5}; char month[6][10] = {"January", "February", "March", "April", "May", "June"}; double previousYear = 0; double currentYear = 0; //size int s = 6; //Title for the beginning of the graph printf(" Rainfall comparison for January to June 2018 "); //graph generating the rainfall comparison for (int i = 0; i   Solve this problem using pointer variables for parameter passing, where appropriate and pointer arithmetic when working with arrays. PROBLEM: Re-do the last rainfall C program you wrote to use pointers wherever possible. Fix any problems you had with the last program. Produce 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. In main, create the 2 data arrays using initializations lists, and also create this array char months(6"anuary", "February", "March", "April", "May", "June" h 3. 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 ! 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. Rainfall comparison for January to June 2018 January February March etc for the rest of the months une LEGEND: * normal rainfall for a given month 1-2018 rainfall for a given month Total normal rainfall was xx.x mm. Total rainfall for 2018 was W mm. 2018 was a drier year than normal bymm. (or print wetter or equal if that is appropriate) The month in 2018 with the highest rainfall was

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

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions

Question

Enhance the basic quality of your voice.

Answered: 1 week ago

Question

Describe the features of and process used by a writing team.

Answered: 1 week ago