public class RevisionQ2
{
public static void main( String args[] )
{
double x, y;
String input;
input = JOptionPane.showInputDialog( null, "Enter value for x:" );
x = Double.parseDouble( input );
y = x*x*x+6x*x+12x+8;
// display answer in message dialog
JOptionPane.showMessageDialog( null,"x*x*x+6x*x+12*x+8"+ y +" for x ="+ x );
}
}
whenever i compile it, i always have this error msg
RevisionQ2.java:15: ';' expected
y = x*x*x+6x*x+12x+8;
any helps on it?
thanks alot!
2006-11-21
00:20:37
·
3 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design