mirror of
https://github.com/MunGell/awesome-for-beginners.git
synced 2026-01-27 13:58:07 -08:00
22 lines
346 B
Java
22 lines
346 B
Java
import java.util.*;
|
|
public class FullNumberPyramid {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner sc=new Scanner(System.in);
|
|
int n=sc.nextInt();
|
|
int c=1;
|
|
for(int i=1;i<=n;i++) {
|
|
for(int j=1;j<=n-i;j++)
|
|
{
|
|
System.out.print(" ");
|
|
}
|
|
for(int k=1;k<=i;k++)
|
|
{
|
|
System.out.print(c++ +" ");
|
|
}
|
|
System.out.println();
|
|
}
|
|
}
|
|
|
|
}
|