
(Assignment 1 - LargestValue)The process of finding the largest value (i.e., the maximum of a group of values) is used frequently in computer applications. Write a Java application (LargestValue.java) that inputs a series of 10 integers and determines and prints the largest integer. Your program should use at least the following three variables: a. counter: A counter to count to 10 (i.e., to keep track of how many numbers have been input and to determine when all 10 numbers have been processed). b. number: The integer most recently input by the user. c. largest: The largest number found so far.

Java Find Largest Number
import java.util.*;
class FindLargest{
public static void main(String[] args){
int max = Integer.MIN_VALUE;
System.out.println("Enter 10 numbers:");
Scanner input=new Scanner(System.in);
for(int i=1;i<=10;i++){
int num=input.nextInt();
if (num > max) {
max = num;
}
}
System.out.println("Largest Number is: "+max);
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.