Answer to Question #334635 in C++ for Jack

Question #334635

Read about doing multiplication using Karatsuba method

Write a C++ program which:

• Prompts user to enter two large integer numbers (x, y).

• Make a function called Karatsuba() which takes these two integers and returns the

multiplication result using Karatsuba algorithm.

o Your function should do parameter validation. Both numbers must be more

than 4 digits and less than 10 digits (don’t use strings). If parameters are not

valid then the function should return 0;

o The entered numbers could be negative or positive. For example: 820778 and

-58712979 where x is 6-digit positive number and y is 8-digit negative

number.


• You might need to make another helper function called getDigits() which will get an

integer as input and returns number of digits of that integer. getDigits() will help you

find the value of m and Bm.

• Finally, display result in the main function


0
Service report
It's been a while since this question is posted here. Still, the answer hasn't been got. Consider converting this question to a fully qualified assignment, and we will try to assist. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS