Write a code fragment that reads 10 integer values from the user and prints the highest value entered.
What will be an ideal response?
```
Scanner scan = new Scanner(System.in);
int max, number;
System.out.print("Enter an integer: ");
max = scan.nextInt();
for (int count = 2; count <= 10; count++)
{
System.out.print("Enter another integer: ");
number = scan.nextInt();
if (number > max)
max = number;
}
System.out.println("The highest value is :" + max);
```
You might also like to view...
RGB stands for ________
Fill in the blank(s) with correct word
According to Davis' model, ________ are the things we must not do to obey the rules.
A. lies B. cons C. prohibitions D. sins
Changing font colors, resizing text boxes, and resizing controls improve form ________
A) quality B) precision C) accuracy D) usability
A(n) ________ is a rule that Solver has to enforce to reach the objective value
Fill in the blank(s) with correct word