We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b613b79 + 17e4480 commit 675e9d5Copy full SHA for 675e9d5
1 file changed
CPP/pattern/star_pattern.cpp
@@ -0,0 +1,27 @@
1
+// This is the code for simple star pattern printing with n rows and m columns.//
2
+#include <bits/stdc++.h>
3
+using namespace std;
4
+int main()
5
+{
6
+ int n;
7
+ // n is the number of rows//
8
+ cout << "Enter number of rows:";
9
+ cin >> n;
10
+ //user will input the value of n//
11
+
12
+ int m;
13
+ //m is the number of columns//
14
+ cout << "Enter number of columns:";
15
+ cin >> m;
16
+ //user will input the value of m//
17
18
+ for (int i = 1; i <= n; i++)
19
+ {
20
+ for (int j = 1; j <= m; j++)
21
22
+ cout << "*";
23
+ }
24
+ cout << endl;
25
+ //It is used for changing line once the second for loop is over//
26
27
+}
0 commit comments