Code:
#include<iostream>
using namespace std;
int nw[10];
short Lookup(char number[],int place){
char map[]={'0','1','2','3','4','5','6','7','8','9'
,'A','B','C','D','E','F','G','H','I','J','K','L','M'
,'N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
,'a','b','c','d','e','f','g','h','i','j','k','l','m'
,'n','o','p','q','r','s','t','u','v','w','x','y','z'};
char n[]={'0','0','0','0','0','0','9','A','C','A'};
short value=-1;
short parseM=0;
for(int i=0;i<61;i++){
if(number[place]==map[parseM]){
value=parseM;
return value;
}
else{
++parseM;
}
}
return value;
}
void Add(char n[],char n2[],int sizeN,int sizeN2){
int base=61;
int top;
int indexNW=9;
if(sizeN<sizeN2){
top=sizeN;
}
else{
top=sizeN2;
}
for(top;top>=0;top--,sizeN--,sizeN2--,indexNW--){
nw[indexNW]=Lookup(n,sizeN)+Lookup(n2,sizeN2)+nw[indexNW];
nw[indexNW-1]=nw[indexNW]/base+nw[indexNW-1];
nw[indexNW]=nw[indexNW]%base;
}
}
int main(){
for(int i=0;i<10;i++){
nw[i]=NULL;
}
char map[]={'0','1','2','3','4','5','6','7','8','9'
,'A','B','C','D','E','F','G','H','I','J','K','L','M'
,'N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
,'a','b','c','d','e','f','g','h','i','j','k','l','m'
,'n','o','p','q','r','s','t','u','v','w','x','y','z'};
char n[]={'0','0','0','0','0','0','0','0','0','A'};
char n2[]={'0','0','0','0','0','0','0','0','0','5'};
int sizeN=sizeof(n)/sizeof(char)-1;
int sizeN2=sizeof(n2)/sizeof(char)-1;
Add(n,n2,sizeN,sizeN2);
for(int i=0;i<10;i++){
cout<<map[nw[i]];
}
system("PAUSE");
return 0;
}