16进制转换
void f16(int z){
int i=0;
char ch[256];
m=z;
do
{
n=m%16;
m=m/16;
switch(n)
{
case 0:ch[i]='0';break;
case 1:ch[i]='1';break;
case 2:ch[i]='2';break;
case 3:ch[i]='3';break;
case 4:ch[i]='4';break;
case 5:ch[i]='5';break;
case 6:ch[i]='6'; break;
case 7:ch[i]='7';break;
case 8:ch[i]='8';break;
case 9:ch[i]='9';break;
case 10:ch[i]='a';break;
case 11:ch[i]='b';break;
case 12:ch[i]='c';break;
case 13:ch[i]='d';break;
case 14:ch[i]='e';break;
case 15:ch[i]='f';break;
}
i++;
count++;
}while(m!=0);
老师说中间的case部分可以用一条语句写出来,可我不会,哪位大侠能帮帮忙,鄙人感激不尽!!!!!!