#include<stdio.h>
#include<conio.h>
void main()
{
int n,a[10],i=0;
clrscr();
printf("Enter any decimal number : ");
scanf("%d",&n);
while(n/16!=0)
{
a[i++]=n%16;
n=n/16;
}
a[i]=n;
printf("Equivalent hexadecimal number is :");
for(;i>=0;i--)
printf("%d",a[i]);
getch();
}
///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........