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.