Skip to content

Commit

Permalink
12th pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
ansiace authored Jan 13, 2025
1 parent 817e477 commit a2c06fc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Pattern12.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include<iostream>
using namespace std;
int main(){
int i , j , row ;
cin>>row;
for( i = 1 ; i <= row ; i++ ){
for ( j = 1 ; j <= 2 * row - 1 ; j++ ){
if ( j >= i && j <= 2 * row - i ){
cout<<"*";
}
else{
cout<<" ";
}
}
cout<<endl;
}
}

0 comments on commit a2c06fc

Please sign in to comment.