Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve this question with all necessary parts to write this code, I tried my best to understand and write this code but didnt work

Please solve this question with all necessary parts to write this code, I tried my best to understand and write this code but didnt work out well, also chegg tutor tried to fix it but never got back to me, solve the code.
Please give the correct code in C++ format and typed .
image text in transcribed
This is the code I wrote.
image text in transcribed
7.21 are introen written in base 16. The 16 digits used are through 9 plus w for the-digit 10", for the-digit 11. c' for the .digit 12. f for the 'digit 13.. e' for the "digit 14", and T' for the "digit 15*. For example, the hexadecimal numeral d is the same as base io numeral 13 and the bexadecimal numeral id is the same as the base 10 numeral 29 write a C+ grogram to perform addition of two hexadecimal numerals each with up to 10 digits. If the result of the addtion is more than 10 digits long, then simply give the outaut messagn Use arrays to store bexadecimal numerals as arrays of characters Output Notes (Prompts and Labels): sach hex inpat stcing ia prompted for by munber of 10 or fever hex digits Type g to stop entry of the hex digits GooD000yyy and "vyy and the result was "zzzzzz 1 inelude ciostrean 2 include omapo 3 using namespace std: 5 int addition(char firet number, char second number) ? int main(int argc, conat char argvt //variables int option, count, of firat 10 12 13 map hex mapper hex mapper[101-A hex hex-mapper[14] ima1 Adder by Dhaval. Enter 1 or 2iini. Input from keyboardin2. Input from filen" 'c', hex-napperm' .D., 'E' hex_Aapper[15] 'F; - 111-'3', hex-mapper[1aj - - - ain > option it (option--1)( 16 cout > second number; for (int I-sizeof (first number) : i 0 -( ooDt se iratan n hrkadeeimal number ot 12 or tever hex ds cout -0)){ 25 26 //go to addition for (int 1-0: jsizeof (hex chars) f 30 count of first++ 32 else if (option -2)( //take file input 39 i/can use do cose cuae doonect input. Please enter again. cc Incorr 43 )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions