Commit a9990cf
committed
feat: Accept and print a 2x2 matrix using nested loops
🧠 Logic:
- Create a 2x2 integer matrix.
- Accept 4 user inputs to fill the matrix using nested `for` loops.
- Print each element twice (as per current logic) in a row-wise manner.
- Each row ends with a newline for better formatting.
Signed-off-by: Somesh diwan <[email protected]>1 parent 41d9114 commit a9990cf
1 file changed
+10
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
| 2 | + | |
| 3 | + | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
22 | 18 | | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
26 | | - | |
| 22 | + | |
0 commit comments