5-9) (Find the two highest scores) Write a program that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score and the student with the second-highest score. SAMPLE RUN #4: Java TwoHighestScores Standard Output Hide Invisibles Enter.the.number of students:Student.1.of.6+ Enter student's.name: Enter.student's score: Student.2.of.6+ Enter.student's name: Enter student's score:student 3.of.6+ Enter student's name: Enter.student's score:Student.4 of.6 Enter student's name: Enter student's.score:Student.5.of.6+ Enter.student's name: Enter student's score:Student.6.of.6 Enter student's.name: Enter.student's.score: The highest.score.was.96.7.and Thomas Collins got-it The second highest.score was 93.3e.and.Amy Dickstein.got.it
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
5-9) (Find the two highest scores)
Write a
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images