1 4 9 16 25 36 49 64 81 100
here is my code:
import javax.swing.JOptionPane;
public class exammethod1
{
public static void main (String [] args) {
String output=" ";
for(int x=1;x<=2;x=x+2){
for(int y=1;y<=100;y=y+3){
output+=" "+y;}
}
JOptionPane.showMessageDialog(null,output,"Result",JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
}
}
please help me get the right output.

New Topic/Question
Reply




MultiQuote








|