#include “stdio.h“#define MAX 50main()int n,aMAX,i=0,sign=0;clrscr();printf(“Please input the decimal num:“);scanf(“%d“,if(n=0)printf(“HEX=%d“,n);printf(“nnnPress any key to exit.“);getch();exit(0);if(n0;i-)switch(ai-1)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;default: printf(“%d“,ai-1);printf(“nnPress any key to exit.“);getch();