摘要:
//对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 * 阅读全文