Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 03 / Solutions / task4.cpp
diff options
context:
space:
mode:
1 files changed, 21 insertions, 0 deletions
-rw-r--r--pract_SI/Pract. 03/Solutions/task4.cpp21
diff --git a/pract_SI/Pract. 03/Solutions/task4.cpp b/pract_SI/Pract. 03/Solutions/task4.cpp
new file mode 100644
index 0000000..622b8a1
--- /dev/null
+++ b/pract_SI/Pract. 03/Solutions/task4.cpp
@@ -0,0 +1,21 @@
+#include<iostream>
+using namespace std;
+int main()
+{
+ unsigned int m, n;
+ cout << "Number of rows: ";
+ cin >> m;
+ cout << "Number of columns: ";
+ cin >> n;
+
+ for (unsigned int i = 1; i <= m * n; i++)
+ {
+ cout << i << " ";
+ if (i % n == 0)
+ {
+ cout << endl;
+ }
+ }
+
+ return 0;
+} \ No newline at end of file