-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpattern13.cpp
More file actions
23 lines (23 loc) · 1007 Bytes
/
pattern13.cpp
File metadata and controls
23 lines (23 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
using namespace std;
int main(){
int n,i,j;
cout<<"Enter the number of lines: ";
cin>>n;
cout<<"The pattern is:\n"; // *
for(i=1;i<=n;i++){ // *
if(i!=(n/2)){ // *
for(j=1;j<=5;j++){ // *
cout<<" "; //*************
} // *
cout<<"*"; // *
} // *
else{ // *
for(j=1;j<12;j++){
cout<<"*";
}
}
cout<<endl;
}
return 0;
}