Tableaux à deux dimensions - Exercice d'algorithmique

18 Sept 2020 · 6 min
6:13

In this French-language tutorial, the presenter explains how to solve an algorithmic exercise that requires storing the grades of 30 students across 12 subjects and computing each student's overall average. He argues that using a single two‑dimensional array (30 rows for students, 13 columns for the 12 subjects plus a column for the average) is far more efficient than declaring twelve separate one‑dimensional arrays plus an extra array for averages. The video details the data structure (a real‑type matrix named notes), the necessary variables (i, j counters and S for the sum), and the indexing convention (1‑based). The algorithm is split into two independent phases, each implemented with nested For loops: the first phase iteratively prompts the user to input each grade, storing it in the appropriate cell; the second phase iterates again to sum each student's 12 grades, compute the average, and store it in the 13th column. He also suggests adding input validation to accept only grades between 0 and 20. Throughout, the presenter emphasizes clarity, readability, and the pedagogical value of two‑dimensional arrays for typical programming problems.

Chapters

More from Yamossoun

8:56
youtube.com

Compteur synchrone - Logique séquentielle

2w ago
11:58
youtube.com

Compteur asynchrone et diviseur de fréquence - Logique séquentielle

3w ago
11:37
youtube.com

Les registres (parallèle et à décalage) - Logique séquentielle

1mo ago
6:14
youtube.com

Bascule T (Toggle) - Logique séquentielle

1mo ago
12:05
youtube.com

Bascule JK - Logique séquentielle

1mo ago
9:17
youtube.com

Bascule D flip-flop active sur front montant - Logique séquentielle

1mo ago
10:08
youtube.com

Bascule D Latch - Logique séquentielle

1mo ago
8:13
youtube.com

Bascule RS - Logique séquentielle

1mo ago
5:04
youtube.com

Logique séquentielle - Introduction

2mo ago
1:15
youtube.com

Le codeur - Logique combinatoire #codeur #logique #circuit #booleanlogic

2mo ago
1:56
youtube.com

Algorithme de calcule de la racine carrée par dichotomie #dichotomy #squareroot #algorithm

3mo ago
See all content