摘要:
//对A=1,B=2...Z=26,AA=27,AA=28,ZZ...//将字符串转为相应整数//c语言实现#include <stdio.h>int countA(char a[])//普通方法{ int all=0; int i=0; while(a[i]!='\0') { all = all * 26 + a[i]-'A' +1 ; i++; } return all;}int countB(char a[])//指针方法{ int all=0; char *p=a; while(*p!='\0') { all = all * 阅读全文
posted @ 2013-03-20 23:10
RaynerBan
阅读(549)
评论(0)
推荐(0)

浙公网安备 33010602011771号