Ajout des fichiers des séances précédentes
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
|
||||
int main(void) {
|
||||
int x;
|
||||
printf("entrez un nombre entier");
|
||||
printf("entrez un nombre entier\n");
|
||||
x = scanf("%d",&x);
|
||||
|
||||
if (x>0) {
|
||||
printf("%d\n", x*3);
|
||||
printf("%d\n", x%3*3);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
1)
|
||||
on a une op conditionnelle où si x = 2 on printf "x vaut 2" ou sinn il
|
||||
différent de 2
|
||||
x = 2 donc on printf "x vaut 2".
|
||||
|
||||
on a un 2e printf sans condition où on print x
|
||||
|
||||
autre op condit ou si x=0 on print x vaut 0 ou sinn il est
|
||||
différent de 0
|
||||
x = 3 donc on print le else
|
||||
|
||||
on print une dernière fois x
|
||||
Reference in New Issue
Block a user