/* Written by Rex Ford for fun */ #include #include using namespace std; int main() { int base=-1; int from_base=-1; string num_str; int num=0; string symbols = "0123456789abcdefghijklmnopqrstuvwxyz"; cout<<"What number?\n"; cin >> num_str; while(from_base>36 || from_base<2) { cout<<"What base was that in?\n"; cin >> from_base; if(base>36 || base<2) cout<<"Your chosen base was not from 2-36...\n"; } //Horner's method for(int i=0;i36 || base<2) { cout<<"What base?\n"; cin >> base; if(base>36 || base<2) cout<<"Your chosen base was not from 2-36...\n"; } //calculates the numbers of digits that num will have when represented in the new base int num_digits=(int)1+(log((double)num)/log((double)base)); for(int exp=num_digits-1;exp>=0;exp--) { int digit_value = num/pow(base,exp); cout<