3 char *change(int num,int base,char *buf)
4 {
5 char *str="0123456789abcdef";
6 char *p;
7 char buff[15];
8 p=buff+14;
9 *p = 0;
10
11 do
12 {
13 *--p = str[num % base];
14 }while(num /=base);
15
16 strcpy(buf,p);
17 return buf;
18 }
4 {
5 char *str="0123456789abcdef";
6 char *p;
7 char buff[15];
8 p=buff+14;
9 *p = 0;
10
11 do
12 {
13 *--p = str[num % base];
14 }while(num /=base);
15
16 strcpy(buf,p);
17 return buf;
18 }