Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ For this exercise, you are to introduce a program that shows a menu of functions/activities that you want user to choose from. The menu

C++

For this exercise, you are to introduce a program that shows a menu of functions/activities that you want user to choose from. The menu will continue to ask for which function to invoke until inputting -1. Also, implement all the functions.

If input is 1: call int findMin(int a[], int size) function. This will return the minimum value of integer array a. size is the length of the array. You may use vector if you prefer. If you use vector, your function should be declared as int findMin(vector a).

If input is 2: call double computeAvg(int a[][a const value of # column], int row, int column) function. This function will compute the average of all elements in a two-dimensional array. If you want to use vector, your function should be declared as int double computeAvg(vector> a). Please randomly generate contents of array/vector.

If input is 3: call bool isLeapYear(int year) function. This function will return true if year is leap year. Otherwise, it will return false. https://en.wikipedia.org/wiki/Leap_year

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

Database Design And SQL For DB2

Authors: James Cooper

1st Edition

1583473572, 978-1583473573

More Books

Students also viewed these Databases questions