Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Multi-Dimensional Arrays | Arrays
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
C# Basisprincipes

book Challenge: Multi-Dimensional Arrays

Taak

Swipe to start coding

A classroom has several rows of students, and each student has a score. You need to calculate the total score for each row using a method that accepts a 2D array.

  • Use array.GetLength(0) to get the number of rows.
  • Use array.GetLength(1) to get the number of columns.
  • Initialize a variable rowTotal = 0 for each row before summing.
  • Use rowTotal += scores[row, col] to add each student's score.
  • Print the row total using Console.WriteLine.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 5. Hoofdstuk 4
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

book Challenge: Multi-Dimensional Arrays

Veeg om het menu te tonen

Taak

Swipe to start coding

A classroom has several rows of students, and each student has a score. You need to calculate the total score for each row using a method that accepts a 2D array.

  • Use array.GetLength(0) to get the number of rows.
  • Use array.GetLength(1) to get the number of columns.
  • Initialize a variable rowTotal = 0 for each row before summing.
  • Use rowTotal += scores[row, col] to add each student's score.
  • Print the row total using Console.WriteLine.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 5. Hoofdstuk 4
single

single

some-alt