APL/APL1.1/CM1/flopee.c
2021-11-16 14:32:27 +01:00

21 lines
368 B
C

#include<stdio.h>
#include<stdlib.h>
#define BORNE_MIN 0L
#define BORNE_MAX 999999999L
int main(int argc, char * argv[]) {
int nb_cubes = 0;
long i;
for (i = BORNE_MIN; i <= BORNE_MAX; i++) {
if ((i*i*i) <= BORNE_MAX) {
nb_cubes++;
} else break;
}
printf("Il y a %d cubes entre %ld et %ld.\n", nb_cubes, BORNE_MIN, BORNE_MAX);
return EXIT_SUCCESS;
}