1. Math
  2. Advanced Math
  3. plz make sure you use the provided code ...

Question: plz make sure you use the provided code ...

Question details

***Please Use provided Program solution In the last_page and use them and modify them PROBLEM: Re-do (Following Program) in the bottom the C program you wrote to use the following functions. Fix any problems you had with the original 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. Create and call a function to return the month name to main() 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! . 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: to work with any data that has this format data and output below are for illustration purposes only.Your program must be able 3.1 5.4 <January data (normal first, then 2018) 4.7 4.4<February data 4.2 4.1 5.0 6.0 4.0 5.6 6.3 4.5 Rainfall comparison for January to June 2018 January FebruaryMarch | etc for the rest of the months June 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 vear than normal by z.z mm. (or print wetter or equal if that is appropriate) The month with the highest rainfall was Privious Program-which have to modify #include-stdio.h> // creating instance varriable to make a comparative graph by using null or void method void Data(double values,char items) int rain-(int)values; /inisitate rain as an integer and Assigning values to rain int amount (int) (values-rain) 10; // make an argument where input will make a number of pattern inti,j; // initilize i andj as an integer for(i-1;i<-rain;i++) // making loop which start from initial to untill last input and make dependent item varriable printf(%c,items); // print an output: Months for(に1,1仁amount/2;i++) //total amount of rain untill unit, loop will be workprintf(%c, items); int main0 int i; //initilize i new integer char months[6][20]-(January ,February: March :,April:,May:.June:); //making array for showup the graph by calculating value printf(\n ); float normal[6],current[6],normal total,current_total; /make array as float int current maximum;//creat feild for maximum cuurent rain by using integer printf( Enter 6 months data normal Vs 2018 by sequentially \n); for(i-0;i<6;i++)//input taking arrgument scanf(%f&normal[i]); //scanning input normal values scanf(%f&current[i); //taking input current month 2018 janto jun values printf( Entered data: \n); printf(Normal Months vs 2018 Months \n);//Showing input dates in 2 row by normal vs current for(i-0:i<6:i++) printi(%.1 f %.1f\n,normal [i],current[i]); //print result after 1 point of decimal value for(i-0;i<6;i++) //inisilizing Normal months times toand cuurent to! to make a graph printf( \n %s , months[i] ); printf( \n| ); //line break Data(normal[i],); // normal rain times to show upthe graph printf( \n| ); Data(currentlil,!); printf(In | ); printf( ); for(i-1;i<8;i++) printr-..-%d ,i); // Making the stand red 8 point line where each point carrie.2 and 5 interval, there is point of 1,2,3,4,5,6,7,8 normal total-normal[0]:; current total-current[0]: current maximum 0;for(i=1;i<6;i++) // loop works same as before until last month and program calculate total for each section normal total+-normal[i]; current-total+=current[i]; if(current[current maximum]<current[i]) current maximum-i; printf( Total rain fall was : %2tmm ,normal-total); printf( Total rain fall for 2018 was : %.2fmm ,current-total); if(normal total> current total) // if statement compare perticular data and findout the highest in normal printf( 2018 was drier than normal by %.2fmm ,normal-total- current total) else printf( Normal was drier than 2018 by %.2f mm ,current,total normal total); //if the highest doesnt workout then else will print the highest of cuurent printf( The month is %s and the rain fall amount, with highest rain fall in 2018 was : 96. 2f n,months[current_maximum],current[current_maximum); / showing total rainfall topplz make sure , you use the provided code , just modify them with function. You can keep For loop but plz avoid if-then . Plz don't add any complex method . Do simple coding . Thanks in advance . Really appreciate your help !!

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