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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!