Question
I need help writing a hexadecimal adder. This is the question: Hexadecimal numerals are integers written in base 16. The 16 digits used are '0' through '9' plus 'a' for the "digit 10", 'b' for the "digit 11", 'c' for the "digit 12", 'd' for the "digit 13", 'e' for the "digit 14", and 'f ' for the "digit 15". For example, the headecimal numeral d is the asme as base 10 numeral 13 and the dexadecimal numeral 1d is the same as the base 10 numeral 29. Write a C++ program to perform addition of two hexadecimal numerals each with up to 10 digits. If the result of the addition is more than 10 digits long, then simply give the output message "Addition Overflow" and not the result of the addition. Use arrays to store hexadecimal numerals as arrays of characters. Include a loop to repeat this calculation for new numbers until the user says she or he wants to end the program.
Explanation / Answer
please rate - thanks #include using namespace std; bool add(char[],int,char[],int,char[],int); int getvalue(char); int main() {const int size=10; char num1[size],num2[size],ans[size+1],yorn; int d1,d2; bool over; do{ coutnum1; coutnum2; for(d1=0;num1[d1]!='';d1++) num1[d1]=toupper(num1[d1]); for(d2=0;num2[d2]!='';d2++) num2[d2]=toupper(num2[d2]); if(d2