// Program to calculate integer results without using int types. // Define the digits. // using namespace std; char digits[]= {'0','1','2','3','4','5','6','7','8','9','\0'}; char one[]= {'1', '\0'}; char zero[]= {'0', '\0'}; // Prototypes for functions that perform integer calculations. // char* sum( char a[], char b[] ); // Returns a + b char* diff( char a[], char b[] ); // Returns a - b char* product( char a[], char b[] ); // Returns a * b bool equal( char a[], char b[] ); // True iff a == b // // Length int length( char a[]) { int j=0; while ( a[j] !='\0') ++j; // Find null terminator. return j; } // Now, code the functions to perform arithmetic. // char* sum( char a[], char b[] ) // Returns a + b { char result[ length(a) + length(b) ]; for (int j=0; j