{
}
Online Python Compiler
Online R Compiler
Online SQL Editor
Online HTML/CSS Editor
Online Java Compiler
Online C Compiler
Online C++ Compiler
Online C# Compiler
Online JavaScript Compiler
Online Typescript Compiler
Typescript Online Compiler
Online GoLang Compiler
Online Rust Compiler
Scala Online Compiler
Dart Online Compiler
Ruby Online Compiler
Online PHP Compiler
Online Swift Compiler
Generating Link
Generating Link
Share your code
Share code
Copy Link
Copied to clipboard
or share using
Black
83
%
Off
November
Ends in
Stop copy pasting code you don't actually understand
Build the coding confidence you need to become a developer companies will fight for
Stop copy pasting code you don't actually understand
Become a PRO
Become a PRO
Black
83
%
Off
November
Ends in
Stop copy pasting code you don't actually understand
Build the coding confidence you need to become a developer companies will fight for
Stop copy pasting code you don't actually understand
Become a PRO
Become a PRO
Online Java Compiler
Learn Python App
Learn Python
Main.java
Output
Main.java
Share
Run
Run
import java.util.*; class Pattern{ public static void main(String[] args){ Scanner sc =new Scanner(System.in); System.out.println("enter no. of row="); int n=sc.nextInt(); for(int i=1; i<=n; i++){ for(int j=1; j<=n-i; j++){ System.out.print(" "); } for(int j=1; j<=i; j++){ System.out.print(j+" "); } System.out.println(); } } }
Output
Clear