Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Multi-Dimensional Arrays | Масиви
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Основи C#

book Challenge: Multi-Dimensional Arrays

Завдання

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.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 5. Розділ 4
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

book Challenge: Multi-Dimensional Arrays

Свайпніть щоб показати меню

Завдання

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.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 5. Розділ 4
single

single

some-alt