Write a program that reads in two hexadecimal numbers by using the cin >> command, and prints out the sum of the two numbers in hexadecimal. For example, 45AF 12B3 your program will output (if you output the result in decimal): The decimal sum of 45AF and 12B3 is 22626. To solve this problem: a) read the hexadecimal numbers as character arrays b) convert the character arrays to numbers (by calling a function that takes the character array as a parameter and returns an integer) c) add the numbers to get a decimal sum !!! Please do C++. The code that is given is:
#include <iostream>
#include <fstream>
using namespace std;
int addTwoHex(string input1, string input2);
string decToHex( int result);
int main() {
//read 2 hex numbers
// pass them to a addTwoHex function that should
return their decimal sum
/* Type your code here. */
return 0;
}