Tampilkanlah Soal bilangan Ganjil dari 3 sampai 25
package inputtext;
/**
*
* @author Bankjeck
*/
import javax.swing.*;
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int x,y;
x=1; y=23;
while (x <= y) //apakah x <= y, jika True
{
x+=2; // nilai x ditambah 2
System.out.println(+x); // cetak nilai x }
}
}
}
package inputtext;
/**
*
* @author Bankjeck
*/
import javax.swing.*;
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int x,y;
x=1; y=23;
while (x <= y) //apakah x <= y, jika True
{
x+=2; // nilai x ditambah 2
System.out.println(+x); // cetak nilai x }
}
}
}