Lets Blog..
Pages
Home
Sample C Programs
Tuesday, 14 May 2013
4. Decimal to Octal & Hexa conversion
4. /* Decimal to Octal & Hexa conversion */
main()
{
int num;
clrscr();
printf("Enter a decimal number : ");
scanf("%d",&num);
printf("\n\nOctal equivalent of %d is %o ",num,num);
printf("\n\nHexa equivalent of %d is %x \n",num,num);
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment