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 transcribed

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.

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 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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

How might management analyze sales territory profitability?

Answered: 1 week ago

Question

Explain the various methods of job evaluation

Answered: 1 week ago

Question

Differentiate Personnel Management and Human Resource Management

Answered: 1 week ago

Question

Describe the functions of Human resource management

Answered: 1 week ago