#include #include "Trinary.h" using namespace std; int main() { int i; char trinaryDigit; int intDigit; for(i = -1; i < 4; i++) { trinaryDigit = IntToTrinaryDigit(i); intDigit = TrinaryToIntDigit(trinaryDigit); cout << i << " is the trinary Digit " << trinaryDigit << endl; if(i != intDigit) { cout <<"Error , " << i << " is not " << intDigit << endl; } } cout << 462 << " is " << IntToTrinary(462) << " in base 3" << endl; cout << endl; for(i = -10; i <= 10; i++) { cout << i << " = " << IntToTrinary( i) << endl; } return 0; }