Ajout du TP06
This commit is contained in:
24
DEV1.1/TP06/tests.c
Normal file
24
DEV1.1/TP06/tests.c
Normal file
@@ -0,0 +1,24 @@
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
double n;
|
||||
double x;
|
||||
printf("Veuillez entrer un réel : ");
|
||||
scanf("%lf", &n);
|
||||
getchar();
|
||||
printf("Veuillez entrer un réel : ");
|
||||
scanf("%lf", &x);
|
||||
getchar();
|
||||
/* TO DO */
|
||||
printf("\n %d \n", n);
|
||||
}
|
||||
else if((n%3) == 1){
|
||||
printf("\n %d \n", n-1);
|
||||
}
|
||||
else {
|
||||
printf("\n %d \n", n+1);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Reference in New Issue
Block a user