====== Find largest of five input integers ======
----
We worked on an algorithm to find the [[list_of_cs-175_assignments#write_an_algorithm|largest of five numbers]]. A possible algorithm is shown below:
Take one number at a time out of the container.
Assume that the first number is the largest.
If the second number is greater than the largest,
the largest is now the second number.
If the third number is greater than the largest,
the largest is now the third number.
If the fourth number is greater than the largest,
the largest is now the fourth number.
If the fifth number is greater than the largest,
the largest is now the fifth number.
In drjava, write //LargestOfFive.java// that does the following:
* Use Scanner input to input 5 int values and store the values in five int variables
* Use //if// statements to find the largest among the five integers.
* Output the value of the largest among the five integers.
Sample input/output:
Input 5 integers, space separated:
44 33 22 66 99
The largest is: 99
[[https://piazza.com/class_profile/get_resource/hzkswvpxv2r2nu/i17wp8ci6cs3ia|Link to source code]]
[[https://piazza.com/class_profile/get_resource/hzkswvpxv2r2nu/i17wtm7hyug43i|Link to program using alternative algorithm]]
----