#include #include #include "digits.h" #include "numbers.h" using namespace std; int main() { int base, number; string otherRep; int convertBack; for (base = 2; base < 22; base += 3) { for(number = 2; number < 20; number ++) { otherRep = IntToNum(number, base); convertBack = StringToInt(otherRep, base); if (convertBack != number) { cout << "Error converting " << number << " to base " << base << " and back!" << endl; } cout << number << " in base " << base << " is " << otherRep << endl; } } return 0; }