Lesson 13 of 23

2D Arrays: Matrices

11 min 30 XP

int m[3][3] म्हणजे 3 rows आणि 3 columns चा तक्ता, जो m[i][j] ने वापरतात. दोन nested loops तो वाचतात आणि print करतात.

Example: edit me and press Run

Output Loading C (first time takes a few seconds)
Press Run to see the result here.

Matrix गुणाकार: C[i][j] = Σ A[i][k] × B[k][j], तीन nested loops. लोकप्रिय interview प्रोग्राम.

Challenge

+30 XP

n आणि एक n × n matrix वाचा. प्रत्येक कर्णाची बेरीज print करा. Input: 3 1 2 3 4 5 6 7 8 9 Output: Main: 15 Other: 15

Output Loading C (first time takes a few seconds)
Press Run to see the result here.