Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in c + + how can i finish this code to find the largest value in the array * Pseudocode: * Level 0 * -

in c++ how can i finish this code to find the largest value in the array
* Pseudocode:
* Level 0
*-------
* Get 15 numbers from the user
* Find the largest value
* Display the largest value
* Level 1
*-------
* Get 15 numbers from the user
* For counter =0 To (SIZE -1) By +1
* Output "Enter number ",(counter +1),"--->"
* Input nums[counter]
* End
* Find the largest value
*
* Display the largest value
* Output EOL, EOL
* Output "The largest values entered was ", largest, EOL
*******************************************************************************/
int main()
{
//Local constants
const int SIZE =15; //Size of the array for user's numbers
//Local variables
int nums[SIZE]; //Array containing user's numbers
int counter; //Loop control variable
int largest; //Largest value of the user's data set
/******************* Begin main Function Executables **********************/
//Get 15 numbers from the user
for (counter =0; counter <=(SIZE -1); counter++)
{
cout << "Enter number "<<(counter +1)<<"--->";
cin >> nums[counter];
}
//Find the largest value
//Display the largest value
cout <<"
";
cout << "The largest values entered was "<< largest << endl;
//Indicate to OS successful termination of program
return 0;
}//End main

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

Discuss essential concepts of family therapy.

Answered: 1 week ago