// 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 // Now, code the functions to perform arithmetic. // int length( char a[]) { int j=0; while ( a[j] !='\0') ++j; // Find null terminator. return j; } char* sum( char a[], char b[] ) // Returns a + b { int lsum= length(1) + length(b) ; char result[ lsum ]; result[0]= '\0'; for (int j=0; j