Hi:
Can anyone Hlep me please :
I have this program for school that i have to get working, i am starting to learn java and i am a little confuse. I need to make the user enter 5 numbers and then show the smallest.. This is what i have:
import java.util.Scanner;
public class Smaller {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
int c;
System.out.println(“How many numbers you wish to enter?”);
c = input.nextInt();
int n;
for (int counter = 1; counter<=c; counter++)
{
System.out.println(“Please Enter the next number”);
n = input.nextInt();
// need to compare with small here, update the smaller # to small
}
}
}
I need to get the second part right.. Thanks for your time!!
Regards
Ed