Subject Name C Program Name Decimal number to Binary, Octal, Hexadecimal number Program Description Write a program to convert a given Decimal number to Binary, Octal, Hexadecimal number To Download Code, Use Ctrl+A(Select All) & Ctrl+C (Copy) Program Code //Write a program to convert a given Decimal number to Binary, Octal, Hexadecimal number #include #include int main() { int d; int i=0,n,n1,j,b; clrscr(); printf("\nChoose:"); printf("\n Decimal to Binary"); printf("\n Decimal to Octal"); printf("\n Decimal to Hexadecimal"); printf("\n Exit"); in: printf("\n\nEnter your choice: "); scanf("%d", &d); switch(d) { case 1: printf("\nEnter decimal number: "); scanf("%d", &n); n1=n; while (n>0) { b[i]=n%2; n=n/2; i++; } printf("\nDecimal No = %d ",n1); printf("\nBinary No = "); for (j=i-1;j>=0;j--) { printf("%d", b[j]); } break; case 2: printf("\nEnter decimal number: "); scanf("%d", &n); n1=n; while (n>0) { b[i]=n%8; n=n/8; i++; } printf("\nDecimal No = %d ",n1); printf("\nOctal No = "); for (j=i-1;j>=0;j--) { printf("%d", b[j]); } break; case 3: printf("\nEnter decimal number: "); scanf("%d", &n); n1=n; while (n>0) { b[i]=n%16; n=n/16; i++; } printf("\nDecimal No = %d ",n1); printf("\nHexadecimal No = "); for (j=i-1;j>=0;j--) { if(b[j]<10) { printf("%d", b[j]); } else { switch(b[j]) { case 10: printf("A"); break; case 11: printf("B"); break; case 12: printf("C"); break; case 13: printf("D"); break; case 14: printf("E"); break; case 15: printf("F"); break; } } } break; case 4: printf("\n BYE BYE"); break; default: printf("\n wrong choice:"); goto in; } getch(); return 0; } Input Values(You must enter all user input value here, that you want to use during runtime) 1 9 To Run C Program1. comment #include, clrscr(), getch(). This will not work online.This (1.) will be done automatically..., So don't worry.2. void main() change to int main() and return 0This (2.) will do it manually, Otherwise it give runtime error but with correct output..., So don't worry