1
0
Fork 0
mirror of https://codeberg.org/DansLeRuSH/c-plus-plus-exercises.git synced 2024-05-18 08:14:57 +00:00

Convert an integer to decimal, octal and hexadecimal

This commit is contained in:
Franck ALBARET 2018-10-19 12:46:42 +00:00
parent 5ce3e38153
commit 6dcbeb9cf1

View file

@ -0,0 +1,13 @@
// Auteur : Franck ALBARET
#include <stdio.h>
int main (void)
{
int Entier;
puts ("Entrer un entier :");
scanf ("%i",&Entier);
printf("L'écriture décimale de l'entier est %i\n",Entier);
printf("L'écriture octale de l'entier est %o\n",Entier);
printf("L'écriture hexadécimale de l'entier est %x\n",Entier);
return 0;
}