{
}
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
NOVEMBER
Ends in
Get 83% off PRO
Ends in
Are you struggling to build your coding confidence or land your first job?
Fast-track to your first pay-check.
Ends in
Start FREE trial →
Start FREE trial →
BLACK
NOVEMBER
Ends in
Get 83% off PRO
Ends in
Are you struggling to build your coding confidence or land your first job?
Fast-track to your first pay-check.
Ends in
Start FREE trial →
Start FREE trial →
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.print("enter the value 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(i+" "); } System.out.println(); } } }
Output
Clear