Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
3.c
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' // Razak-7051 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
motifCatur
homework
Решето Эратосфена
// Java Coding Challenge - 08: Reversing a Number using StringBuilder
2.C
even to 100
Hello world
PE #9
Человечки
1(E)