#include#include void main(){ int a,i;char s[20];printf("Input a:\n");scanf("%d",&a);cDectoHex(s,a);for(i=strlen(s)-1;i>=0;i--)printf("%c",*(s+i));printf("\n");}cDectoHex(char *p,int b){ int j;while (b>0){ j=b%16;if (j
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/09 08:48:37
![#include#include void main(){ int a,i;char s[20];printf(](/uploads/image/z/3002419-19-9.jpg?t=%23include%23include+void+main%28%29%7B+int+a%2Ci%3Bchar+s%5B20%5D%3Bprintf%28%22Input+a%3A%5Cn%22%29%3Bscanf%28%22%25d%22%2C%26a%29%3BcDectoHex%28s%2Ca%29%3Bfor%28i%3Dstrlen%28s%29-1%3Bi%3E%3D0%3Bi--%29printf%28%22%25c%22%2C%2A%28s%2Bi%29%29%3Bprintf%28%22%5Cn%22%29%3B%7DcDectoHex%28char+%2Ap%2Cint+b%29%7B+int+j%3Bwhile+%28b%3E0%29%7B+j%3Db%2516%3Bif+%28j)
xUR"G~)SIbQr