#include #include #include "Trinary.h" using namespace std; bool DEBUG{true}; int main() { int i; int value; string triValue; for(i = -10; i < 11; i++) { triValue = IntToTrinary(i); value = TrinaryToInt(triValue); if (i != value) { cout << "Error"<< i << " != " << value << endl; } if (DEBUG) { cout << setw(4) << i << setw(10) << triValue << endl; } } cout <<"112211 in trinary is " << TrinaryToInt("112211") << endl; }