24 lines
386 B
C
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;
|
|
} |