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

maj cours 2

parent dc0a2fdc
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ date: "2022-09-28" ...@@ -10,6 +10,7 @@ date: "2022-09-28"
. . . . . .
* La boucle `while`, * La boucle `while`,
* La boucle `do ... while`,
* La boucle `for`, * La boucle `for`,
* La condition `if ... else if ... else`, * La condition `if ... else if ... else`,
...@@ -83,7 +84,7 @@ int main() { ...@@ -83,7 +84,7 @@ int main() {
# Exercice: test si un nombre est premier # Exercice: test si un nombre est premier
## Avec tout ce que vous avez appris la dernière fois: ## Avec tout ce que vous avez appris jusqu'ici:
* Écrivez le code testant si un nombre est premier. * Écrivez le code testant si un nombre est premier.
* Quels sont les ajouts possibles par rapport au code de la semaine passée? * Quels sont les ajouts possibles par rapport au code de la semaine passée?
...@@ -269,7 +270,6 @@ int ppcm(int a, int b) { ...@@ -269,7 +270,6 @@ int ppcm(int a, int b) {
```C ```C
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
int main() { int main() {
int n = 15, m = 12; int n = 15, m = 12;
int i = 1; int i = 1;
...@@ -287,7 +287,6 @@ int main() { ...@@ -287,7 +287,6 @@ int main() {
```C ```C
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
int main() { int main() {
int res = n*m; int res = n*m;
for (int i = 2; i <= m; i++) { for (int i = 2; i <= m; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment