As stated coding the line as
Double num
will work, to save you time, save it as a global Variable eg.
double num=0;
for(i=0;i<=4;i=i+1)
{
System.out.println("what is your favorite number")
num=kb.nextDouble ();
}
the forloop is not what im trying to tell you, its that if you put you int after you public static void main, and before what ever you will have the program do, itll save you a lot of time
|