Previous Next Up Index Contents

Exercice 8.10

#include <stdio.h>
#include <stdlib.h>
 main()
{
 long N;
 char STR[200];
 do
    {
     puts("Entrez un nombre :");
     scanf("%ld",&N);
     printf("Entrée  = %ld\n", N);
     printf("base 2  = %s\n", ltoa(N, STR, 2));
     printf("base 8  = %s\n", ltoa(N, STR, 8));
     printf("base 16 = %s\n", ltoa(N, STR, 16));
    }
 while(N);
 return 0;
}


Previous Next Up Index Contents

Feedback - Copyright © 1993,1996,1997 F.Faber