J
Jeremy
}Hey, Sorry to bother you, I have output that is not doign what i want it
to
do. I'm just having trouble getting it to run the way I want it to do.
I'm
having trouble getting the first value read specific the number of value
to
input from the users....
here's the output of the program i got.
Indicate how many values you want to input:2
Indicate numbers you want to calcuate for smallest integer:2
Press any key to continue...
import java.util.Scanner;
public class Input// public class name input
{
public static void main (String args[])// main method to begine xecution
of
program
{
Scanner input = new Scanner(System.in);
int counter=1;// counter intialized to 1
int smallestnumber=0;//smallest number intialized to 0;
int values=0;// values intialized to 0;
int number=0; number is intialized to 0;
{
System.out.printf("Indicate how many values you want to input:"); // ask
user
how many values you want to input and prompts you to do that.
values =input.nextInt();
while ( counter<=values)// while statement that will count within values
{
System.out.println();
++counter;
values=number;
}
System.out.printf("Indicate numbers you want to calcuate for smallest
integer:");// ask what number you want to calcuate for the smallest
integer.
number =input.nextInt();
while (values==number)// this is not right statement anything
{
number=smallestnumber;
if (smallestnumber<=number)
{
System.out.println(smallestnumber);
}
}
}
}