I will show you step
by step. Today I have made a program. I hope it will help you
To searching a value decimal to octal and hexadecimal. The program
is given below.
#include<stdio.h>
int main()
{
int a;
printf("enter a posetive integer number:\t");
scanf("%d",&a);
printf("\nyou have entered : %i (indecimal format)",a);
printf("\nyou have entered : %o (octal format)",a);
printf("\nyou have entered : %x (hexadecimal format)",a);
return 0;
}
int main()
{
int a;
printf("enter a posetive integer number:\t");
scanf("%d",&a);
printf("\nyou have entered : %i (indecimal format)",a);
printf("\nyou have entered : %o (octal format)",a);
printf("\nyou have entered : %x (hexadecimal format)",a);
return 0;
}
0 comments:
Post a Comment