find the smallest integers

J

Jeremy

the program to find smallest of several integers, then it assume that first
value read specific the number of values to input rom the users.

If i can get the value specify the input from the reader, then i know i can
finish the other let me know.
import java.util.Scanner;
public class Input

{
public static void main (String args[])
{
Scanner input = new Scanner(System.in);
int counter=1;
int smallestnumber=0;
int values=0;
int number=0;

{
System.out.printf("Indicate how many values you want to input:");
values =input.nextInt();

while ( counter<=values)
{
System.out.println();
++counter;
values=number;

}


System.out.printf("Indicate numbers you want to calcuate for smallest
integer:");
number =input.nextInt();
while (values==number)
{
number=smallestnumber;
if (smallestnumber<=number)
{

System.out.println(smallestnumber);
}
}






}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top