How can i split and Height squared them...I am new in java so please understand me....
import javax.swing.JOptionPane;
public class Square {
public static void main(String args[]){
String numb;
int numb1,i=0,xnum = 0;
numb= JOptionPane.showInputDialog("Input a integer number");
numb1=Integer.parseInt(numb);
if (numb1<=0){
JOptionPane.showMessageDialog (null,"Enter a Positive Number Only!"
,"Attention",JOptionPane.WARNING_MESSAGE );
}
[color="#FF0000"]while (i<numb1)
xnum= numb1*numb1;
i++;[/color]
JOptionPane.showMessageDialog(null,"The sum of the square is " +xnum
,"Result",JOptionPane.INFORMATION_MESSAGE);
}
}
i am stuck here.....

New Topic/Question
Reply




MultiQuote








|