Question: Write a function definition for the following situation: a) Function inputItem( ) to read and store items name that get from user. b) Function totalPerItems

Write a function definition for the following situation: a) Function inputItem( )Write a function definition for the following situation: a) Function inputItem( ) to read and store items name that get from user. b) Function totalPerItems ( ) to calculate and display the total expenditure for each item that received two parameter which are array budget and array item. c) Function totalMay ( ) to calculate and returns the total expenditure for May that receives two parameter which are array budget and array month. d) Write the main function that will do the following task: i. Declares the two-dimensional array named budget and initialized it with the value given in table above. ii. Declare the array named item. iii. Declare the array named month and initialized it with the value month in table above. iv. Call the above functions.

Consider the following two-dimensional array declaration. int main() \{ const int ITEM =5; const int MONTH =6; double budget[ITEM][MONTH]; // value must be initialized and the value of budget based on the table below RUBRIC string item[ITEM]; //value from user string month[MONTH]; //value must be initialized This budget array stores a six month budget for individual items. Each row of the array corresponds to a particular budgeted item like rent, electric, water, internet and cleaner. Each column of the array corresponds to six month from January until June. Table below shows the sample input data for above array

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!