Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Practice Program 3 User will enter a value (N) which represents the number of values to process (must be500) User enters N numbers in the

image text in transcribed

Practice Program 3 User will enter a value (N) which represents the number of values to process (must be500) User enters N numbers in the range of -2147483648 to 2147483647* User will enter N numbers which will be stored in an array Program will compute and display the sum, average, largest, and smallest of the N numbers Program will also search the array for a specific value, NOTE you must have a separate loop to input the data+ a separate loop to sum the data and find the largest and smallest values- A separate loop is needed to search the array for a specific value #include // required header file for input/output using namespace std, nt maiI t // declare a long array that has 500 elements and other variables required for this program do// program will execute the code in the loop at least one time f" // tell the user to input a number which is the number of data values to process // write a loop to input the data into an array- only enter data in this loop // write a loop to compute the sum, largest and smallest value // display results of sum, average, largest and smallest // ask user to enter a search valuev // write a loop to search the array for the search value entered by the user // if value is found in the array display subscript number (1st occurrence) or display a message the search // value was not found in the array coutc" to run the program again enter a 1; to stop the program enter a 0 ,,:- cin>>again, ) while (again !0); // pause the program to see the results //system("pause"); //this is a windows command; leave this statement in the code //return 0; //optional statement, may be required for .NET compiler

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions