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.