18 lines
291 B
C
18 lines
291 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(void){
|
|
int n;
|
|
int err;
|
|
|
|
printf("Entrer un entier naturel ");
|
|
err= scanf("%d",&n);
|
|
if ((n%3)<=1) {
|
|
printf("le multiple le plus proche est : %d\n", (n /3)*3);
|
|
} else {
|
|
printf("%d\n",(n/3+1)*3);
|
|
}
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
/*
|