waleed
unknown
plain_text
3 years ago
528 B
8
Indexable
public static void main(String[] args) {
int n;
do {
n= Integer.parseInt(JOptionPane.showInputDialog("enter the number of rows"));
}
while( n<=0 );
for (int z=1; z<=n ; z++) {
for (int i=z; i<n; i++)
{
System.out.print(" ");
}
for (int j=1; j<=n*2; j++)
{
System.out.print("*");
}
System.out.println();Editor is loading...