Skip to content

Commit a2c06fc

Browse files
authored
12th pattern
1 parent 817e477 commit a2c06fc

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Pattern12.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include<iostream>
2+
using namespace std;
3+
int main(){
4+
int i , j , row ;
5+
cin>>row;
6+
for( i = 1 ; i <= row ; i++ ){
7+
for ( j = 1 ; j <= 2 * row - 1 ; j++ ){
8+
if ( j >= i && j <= 2 * row - i ){
9+
cout<<"*";
10+
}
11+
else{
12+
cout<<" ";
13+
}
14+
}
15+
cout<<endl;
16+
}
17+
}

0 commit comments

Comments
 (0)