示例代码: #include <stdio.h>#define N 16 void dg(int a){ int y = a%N; int next = (a-y)/N; if (next) { dg(next); } if (y>9) { printf("%c",65+y%10); } else { printf("%d",y); } return ;} int main(void){ int a = 0 ; scanf("%d&quo…
public class DigitalTrans { /** * 数字字符串转ASCII码字符串 * * @param String * 字符串 * @return ASCII字符串 */ public static String StringToAsciiString(String content) { String result = ""; int max = content.length(); for (int i = 0; i < max; i++) { char c…
#!/usr/bin/env python # -*- coding: utf-8 -*- # 2/10/16 base trans. wrote by srcdog on 20th, April, 2009 # ld elements in base 2, 10, 16. import os,sys # global definition # base = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F] base = [str(x) for x…