\\163.22.22.65\f$\祘砞呼\My Webs\expamle_for_c\穝糤ゅゅン.txt.html
void inverse(char *s) {
    int i, j;
    char c;
    // 安砞﹃n,盢0㎝n-1秸传,传1㎝n-2,﹃い丁ゎ
    for (i = 0, j = strlen(s) - 1; i < j; i++, j--) {
        c = s[i];
        s[i] = s[j];
        s[j] = c;
    }
}

/**
 * 盢valb秈╰参ㄓ笷,挡狦﹃s柑
 */
void convert(char s[], int val, int b) {
    int i = 0;
    int digit;
    while (val / b > 0) {
        digit = val % b; // 璸衡程
        // 10计A-Zㄓ
        s[i++] = (digit < 10) ? digit + '0' : digit - 10 + 'A';
        val /= b;
    }
    s[i++] = (val < 10) ? val + '0' : val - 10 + 'A';
    s[i] = 0;
    inverse(s);
}

--Back--