Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
3c
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' //Lokesh reddy 7002 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int i , j , n ,a=1; Scanner in = new Scanner(System.in); System.out.println("Enter the number of line to print\n"); n = in.nextInt(); for(i=1;i<=n;i++) { for(int s=0;s<n-i;s++) { System.out.print(" "); } for(j=1;j<=i;j++) { System.out.print(a+" "); a++; } System.out.println("\n"); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
String
상속1
fs
Given two sorted arrays, merge them such that the elements are not repeated
extendd11
Round Price
1.6
t-primes
1(D).
Prime Factors
Please log in to post a comment.