i’ve to show u smthing . i’m getting error while doing programming
how can i show u . I mean image option is not available.
import java.util.Scanner;
public class Hello {
public static void main(String[] args) {
Scanner scn=new Scanner(System.in);
int n=scn.nextInt();
int nsp=n-n;
int nst=n;
int row=1;
while(row<=n) {
int csp=1;
while(csp<=nsp){
System.out.print(" ");
csp++;
}
int cst=1;
while(cst<=nst) {
System.out.println("*");
cst++;
}
System.out.print("\n");
row=row+1;
nsp=nsp+1;
nst=nst-1;
}
}
}
is it right