Computer Science, asked by tomarvinay9197, 2 days ago

How to make algorithms and flowchart of to find the largest number among the three numbers . As long as the user enter zero

Answers

Answered by samarthkrv
0

Answer:

import java.util.*;

public class Main

{

public static void main(String[] args) {

 Scanner scanner = new Scanner(System.in);

 ArrayList<Integer> num = new ArrayList<Integer>();

     for(int i = 0; i < 3; i++)

     {

         System.out.println("Enter number " + (i+1));

         int x = scanner.nextInt();

         num.add(x);

     }

     int y = Collections.max(num);

     System.out.println("The largest of the 3 numbers is " + y);

}

}

Explanation:

Similar questions