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 26c7db7 commit cbb6e94Copy full SHA for cbb6e94
patterns/rightLeanedDiamond.cpp
@@ -0,0 +1,26 @@
1
+#include <iostream>
2
+
3
+using namespace std;
4
5
+int main()
6
+{
7
8
+ int num;
9
+ cin >> num;
10
11
+ for(int i=1; i<=2*num; i++){
12
13
+ if(i==num+1)
14
+ continue;
15
+ for(int j=1; j<= num; j++){
16
17
+ if(j<=i && i+j<= 2*num+1)
18
+ cout << "* ";
19
+ else
20
+ cout << " ";
21
+ }
22
+ cout << endl;
23
24
25
+ return 0;
26
+}
0 commit comments