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);
}
}
}
}
}
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);
}
}
}
}
}