Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop a system flowchart and then write a menu-driven Cre program that uses user-defined functions arrays, and a random number generator Upon program execution, the

image text in transcribed
image text in transcribed
Develop a system flowchart and then write a menu-driven Cre program that uses user-defined functions arrays, and a random number generator Upon program execution, the screen will be cleared and the menu shown below will appear at the top of the screen and centered. The menu items are explained below Help Largest Quit H or h ( for Help ) option w?? ?noke a function named held) which wil display a help screen. The help screen(s) should guide the user how to interact with the program, type of data to be used, and what results would the program produce. Each help screen should remain on the monitor untl the user strikes any key. Once the user completes reading the help) screens, striking any key will clear the screen and the menu is dsplayed again The mainO function w dedare an array of 15 elements. The elements are of type float. The menu option will ask the user for the actual number of elements for the array. The program must verty that the actual number of elements does not exceed 15 and is not a negative number or 0. Your code must check for these L or I for Largest ) option will isvoke a function named lorgestJwhich will prompt the user for the number of elements for the array to be examined using the function sineOfArrayJwhich will read and validate the desined array elements and returns it to the calling function. The program will then use the returned size of the array to fill the array using the number generator functions shown at the end of this assignment. Your program will ask the user for the range of values for the elements of the array and uses these numbers in a random generator function to fl the array. Once the array is tilled, the program wi call the function findiorgestf J which will find and return the largest number in the array to the calling function. The program will then call the function frequency),that will compute and returm the frequency of occurrence of the largest number. The program will then display the array elements, the largest number, and its frequency of occurrence using the function displayf & in the format shown below. The output shown is for an array of five elements with an array identifier a 101- 133-ax 123-a 133-a al4] xxxx.xx requency-xx Note that for the array elements, two digits after the decimal point is required ie 298 35) and the frequency of occurrence is of type integer The function prototypes to be used are as folows void largest(float s|), int size); where s is the original array declared in the main@ function and size is the maximum aray sire (15 elements in our case). /gets the desired array size and returns it int sizeofArray (vold) a //finds the largest number in the array and returns it via the return statement

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

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions

Question

Express in terms of i. --25

Answered: 1 week ago