21 lines
368 B
C
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;
|
|
}
|
|
|