import java.util.Scanner;
public class Input {
public Input() {
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int i,j,n;
System.out.print("Please input N= "); n=in.nextInt();
for(i=1;i<=n;i++)
{
for(j=0;j<n-i;j++)
{
System.out.print(" ");
}
for(j=0;j<(i*2)-1;j++)
{
System.out.print("A");
}
for(j=0;j<n-i;j++)
{
System.out.print(" ");
}
System.out.println();
}
}
}
+Output
No comments:
Post a Comment