Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedWrite 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

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

How was their resistance overcome?

Answered: 1 week ago