Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pls using the basic c++ format. Start with #include Write a program sum of the two numbers in hexadecimal. that reads in two hexadecimal numbers

image text in transcribedPls using the basic c++ format.
Start with #include
Write a program sum of the two numbers in hexadecimal. that reads in two hexadecimal numbers from a file, hex.ext, and prints out the From Wikipedia: "In mathematics and computer science, hexadec hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0-9 to represent val and A, B, C, D,E, F (or alternatively a-f) ues zero to nine, to represent values ten to fifteen AF3 is equal, in decimal, to THE SUM OF: For example, the hexadecimal number 2 (2x 16') + (10 x 162) + (15 x 16') + (3x ie) og 10,995." For example, if the file contains: 45AF 12B3 ...and then your program will output (if you output the result in decimal): sten (Haxt) The decimal sum of 45AF and 12B3 is 22626. (To check your results, you can go to a hexadecimal calculator on the Web. For example, http://www.csgnetwork.com/hexaddsubcalc.html) To solve this problem: Read the hexadecimal numbers as character arrays Convert the charac character array as a parameter, and returns an integer) Add the numbers to get a decimal sum EXTRA CREDIT: convert the sum to hexadecimal (by calling a function that fills a) b) ter arrays to numbers (by calling a function that takes the c) d) a character array) PART II Assume that your file has an unknown number of hexadecimals. Modify/ Enhance/Change the program so that it prints the sum of all the numbers in the file

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago