View Single Post
  #3 (permalink)  
Old 10-02-2008
m_finein m_finein is offline
Peon
 
Join Date: Oct 2008
Posts: 1
Default

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
Reply With Quote