Skip to content

Commit

Permalink
Program to print right side triangle
Browse files Browse the repository at this point in the history
Program to print right side triangle
  • Loading branch information
Arunkumar1712 authored Jan 8, 2024
1 parent e6f3864 commit 4744b39
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions right triangle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//right triangle
var n=5;
var st="";
for(var i=0;i<n;i++){
for(j=n-1;j>i;j--){
st+=" ";
}
for(k=0;k<=i;k++){
st+="*"
}
st+="\n";
}
console.log(st);

0 comments on commit 4744b39

Please sign in to comment.