#include #include #include int Suite(long val){ long tab[100]; int valor; int i = 0; for(i = 0; i<100; i++){ if(i == 0){ valor = val; } else{ valor = tab[i-1]/2; } tab[i] = valor; if(i == 0){ printf("%d,", tab[i]); }else if(tab[i]%2!=0){ printf("%d.", tab[i]); break; }else{ printf("%d,", tab[i]); } } } int main(int argc, char const *argv[]) { if(argc<2){ printf("Erreur ! L'usage est : %s ", argv[0]); } long val; val = strtol(argv[1],NULL,10); Suite(val); return EXIT_SUCCESS; }