Ajout des fichiers des séances précédentes

This commit is contained in:
2025-09-16 16:46:00 +02:00
parent f451fce786
commit 222dc0d00a
6 changed files with 40 additions and 14 deletions

25
DEV1.1/TP06/Exo1.c Normal file
View File

@@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int x=3;
if (x=2) {
printf("x vaut 2\n");
} else {
printf("x est different de 2\n");
}
printf("%d\n", x);
if (x=0) {
printf("x vaut 0\n");
} else {
printf("x est different de 0\n");
}
printf("%d\n", x);
return EXIT_SUCCESS;
}

14
DEV1.1/TP06/Exo2.c Normal file
View File

@@ -0,0 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int x;
printf("entrez un nombre entier");
x = scanf("%d",&x);
if (x>0) {
printf("%d\n", x*3);
}
return EXIT_SUCCESS;
}

View File