DEV/DEV1.1/TP06/tests.c
2024-09-10 17:30:28 +02:00

24 lines
386 B
C

# 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;
}