java for loop not working
Posted
by
Steve
on Stack Overflow
See other posts from Stack Overflow
or by Steve
Published on 2011-01-01T12:19:10Z
Indexed on
2011/01/01
12:53 UTC
Read the original article
Hit count: 267
I hope this isn't a stupid question but I have looked up every example I can find and it still seems like I have this code right and it still isn't working... I enter one number and it moves on to the next line of code instead of looping. I'm using this to fill an array with user input numbers. I appreciate any help, thanks.
for(i=0; i<9; i++);
{
System.out.println ("Please enter a number:");
Num[i] = keyboard.nextDouble();
Sum += Num[i];
Product *= Num[i];
}
© Stack Overflow or respective owner