We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2221d6c commit 32b17a8Copy full SHA for 32b17a8
C++/ButterFlyPattern.cpp
@@ -0,0 +1,38 @@
1
+#include<iostream>
2
+using namespace std;
3
+
4
+int main(){
5
+int n;
6
+cin>>n;
7
8
+for(int i=1;i<=n;i++){
9
+ for(int j=1;j<=i;j++){
10
+ cout<<"*";
11
+ }
12
+ int space =2*n-2*i;
13
+ for(int j=1;j<=space;j++){
14
+ cout<<" ";
15
16
17
18
19
+ cout<<endl;
20
+}
21
22
+for(int i=n;i>=1;i--){
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
+ return 0;
38
0 commit comments