/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Bintang;
/**
*
* @author FIQI
*/
import javax.swing.*;
public class Bintang1 {
public static void main (String[] args)
{
int x;
x=Integer.valueOf(JOptionPane.showInputDialog("Masukkan Banyak Bintang ?"));
for (int i=1;i<=x;i++){
for (int j=1;j<=x;j++){
if (j<=i)
System.out.print("*");
else
System.out.print(" ");
}
System.out.println();
}
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package Bintang;
/**
*
* @author FIQI
*/
import javax.swing.*;
public class Bintang1 {
public static void main (String[] args)
{
int x;
x=Integer.valueOf(JOptionPane.showInputDialog("Masukkan Banyak Bintang ?"));
for (int i=1;i<=x;i++){
for (int j=1;j<=x;j++){
if (j<=i)
System.out.print("*");
else
System.out.print(" ");
}
System.out.println();
}
}
}
0 komentar:
Posting Komentar
: Ayoo sharingg.. :D