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]
# 1
The major problem is that you are an idiotic fuckwad.4th stupid thread for this stupid question and still can't post formatted code either. Go back here http://forum.java.sun.com/thread.jspa?threadID=774346&tstart=0
cotton.ma at 2007-7-15 1:27:46 > top of Java-index,Java Essentials,New To Java...
# 2
!.You didnt use the [code][/code] tags.2. You didnt follow Java codeing standards.3. You didnt ask a pointed question.4 You dont seem to take the advise of others in these forums.Need I go on?
Java_Jaya at 2007-7-15 1:27:46 > top of Java-index,Java Essentials,New To Java...
# 3
> The major problem is that you are an idiotic fuckwad.are you two husband and wife?
Michael_Dunna at 2007-7-15 1:27:46 > top of Java-index,Java Essentials,New To Java...
# 4
i can't take the advise cuz i don't understand the pplsecond dunno how to use /code **** and last we're not husband and wife.
Cupcakea at 2007-7-15 1:27:46 > top of Java-index,Java Essentials,New To Java...
# 5

> 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.

Java_Jaya at 2007-7-15 1:27:46 > top of Java-index,Java Essentials,New To Java...
# 6

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

}

}

harmora at 2007-7-15 1:27:46 > top of Java-index,Java Essentials,New To Java...