Algorithmique (4/14) - Lecture et écriture

15 Nov 2018 · 7 min
6:39

In this French instructional video, the presenter explains how algorithms interact with users through input (Lire) and output (Ecrire). He starts with a simple addition algorithm that uses fixed values (A=10, B=20) and shows its limitation because the result is always the same. He then demonstrates how to modify the algorithm so that the user provides the values for A and B, using Ecrire to display prompts and Lire to read the entered numbers. The lecture covers the syntax of Lire (assigning user input to variables) and the blocking behavior of the instruction. It explains how Ecrire displays either string literals (enclosed in single quotes) or variable values (without quotes) and how to concatenate strings and variables within Ecrire using a comma. Several examples illustrate reading single and multiple values, performing the addition, and displaying the result in various formats, such as just the number, a phrase like "La somme vaut 18", or a formatted expression "15 + 3 = 18". The presenter also shows a compact version using only two variables and reading multiple inputs at once. The lesson concludes with a recap of the roles of Lire and Ecrire for user interaction in algorithms.

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