Jeremy schreef:
>> Hey, Sorry to bother you, I have output that is not doign what i want it
>> to
[quoted text clipped - 8 lines]
>> Indicate numbers you want to calcuate for smallest integer:2
>> Press any key to continue...
You didn’t formulate a question, but I’ll give some comments on your code:
>> import java.util.Scanner;
>> public class Input// public class name input
[quoted text clipped - 22 lines]
>> values=number;
>> }
Since number is 0, values will be 0 after the first loop, which makes
this code equivalent to:
if (values >= 1) {
System.out.println();
counter = 2;
values = 0;
}
That doesn’t seem to make any sense. Please reconsider.
>> 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
values is 0, so it will only execute when the user entered 0.
>> {
>> number=smallestnumber;
[quoted text clipped - 4 lines]
>> }
>> }
Have a look at the last link in my sig.
H.
- --
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html