30 lines
530 B
C
30 lines
530 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
int num;
|
|
int oeuf;
|
|
int douzaine;
|
|
int grosse;
|
|
printf("Combien d'oeufs ? ");
|
|
scanf("%d", &num);
|
|
oeuf = (num%12);
|
|
douzaine = (num/12)%12;
|
|
grosse = (num/12)/12;
|
|
if(oeuf>1){
|
|
printf("%d oeufs\n", oeuf);
|
|
}else{
|
|
printf("%d oeuf\n", oeuf);
|
|
}
|
|
if(douzaine>1){
|
|
printf("%d douzaines\n", douzaine);
|
|
}else{
|
|
printf("%d douzaine\n", douzaine);
|
|
}
|
|
if(grosse>1){
|
|
printf("%d grosses\n", grosse);
|
|
}else{
|
|
printf("%d grosse\n", grosse);
|
|
}
|
|
return EXIT_SUCCESS;
|
|
} |