Question: This is my code so far and it's for a basic Java class. The purpose for the code is to prompt the user for 10
This is my code so far and it's for a basic Java class. The purpose for the code is to prompt the user for 10 integers and then display the largest and smallest integer that was inputed. I was able to ask the user for the 10 integers and display the largest number; however, the smallest number isn't shown. It just displays that the smallest integer is 0.

E import java.util.Scanner; public class Largesmall public static void main (String [] args) int counter 1; int largest = 0; int smallest 0; int number0; Scanner input- new Scanner(System.in); while (counter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
