Skip to content

Commit

Permalink
Inverted right angled triangle
Browse files Browse the repository at this point in the history
  • Loading branch information
suhanigupta23 authored Jan 30, 2024
1 parent 4245381 commit 93f43f1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions invertedrighttriangle.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//*****
//****
//***
//**
//*
import java.util.*;
public class Program
{
public static void main(String[] args)
{
Scanner scn=new Scanner(System.in);
int n=scn.nextInt();
for(int i=n;i>=1;i--)
{
for(int j=i;j>=1;j--)
{
System.out.print("*");
}
System.out.println("");
}

}
}

0 comments on commit 93f43f1

Please sign in to comment.