Skip to content

Commit

Permalink
Update starpattern3.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ansiace authored Jan 1, 2025
1 parent dd598f9 commit ec23c87
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions starpattern3.cpp
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#include<iostream>
using namespace std;
int main()
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=5;j++)
{
if(j>=i)
{
int main() {

int i , j , n ;
cin>>n;

for ( int i = 1 ; i <= n ; i++ ){

for ( int j = 1 ; j <= n ; j++ ){

if( j >= i ){
cout<<"*";
}
else
{
else{
cout<<" ";
}
}

cout<<endl;

}
}

}

0 comments on commit ec23c87

Please sign in to comment.