Skip to content
Snippets Groups Projects
Verified Commit e3de7b13 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

maj rappel

parent be0a4570
Branches
No related tags found
No related merge requests found
......@@ -3,7 +3,26 @@ title: "Introduction aux algorithmes"
date: "2022-09-28"
---
# Rappel
# Rappel (1/2)
* Quel est l'algorithme pour le calcul des nombres 1ers?
. . .
```C
bool est_premier(int nombre) {
int i = 2; // bonne pratique!
while (i < nombre) { // penser à bien indenter!
if (0 == nombre % i) { // ça rend le code LISIBLE!
return false;
}
i += 1;
}
return true;
}
```
# Rappel (2/2)
* Quelles structures de contrôles avons nous vues?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment