What's wrong?
import java.util.*;
public class sin
{
public static void main (String [] args)
{
Scanner input = new Scanner (System.in);
int number ;
int num1, num2, num3, num4, num5, num6, num7, num8, num9;
boolean valid;
System.out.print("Welcome" +"Please enter a 9 digit number :" +number);
number = input.nextInt();
while(number <= 0)
{
System.out.print("Welcome" +"Please enter a 9 digit number :" +number);
number = input.nextInt();
}
}
}
something with variable not initialized?
[591 byte] By [
Cupcakea] at [2007-10-3 6:39:06]

> i can't take the advise cuz i don't understand the
> ppl
> second dunno how to use /code **** and last we're not
> husband and wife.
Thats bad, you cant click on the code button right above the text window you type your questions in?
Give up now, become a liberal arts major.
I'll try to help.
I don't know if your structure is bad as the one pasted or the spaces were lost during the pasting.
Can you explain what you're trying to do?
I rewrote the code.
import java.util.*;
public class CountNumber
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
int number;
System.out.print("Welcome, Please enter a postive number: ");
number = input.nextInt();
if(number < 0)
{
System.out.println("ERROR: The number that you have entered is a negative number\n\n");
System.exit(0);
}
while(number >= 0)
{
System.out.println("The number is: " + number);
number--;
}
System.out.println("\n\n");
}
}