Question
in C++ Create a function multiply that will take two vectors of integers (output from number_to_expanded) and return an integer that is the result of
in C++ Take number_to_expanded and overload it such that it takes a double and outputs a vector of double. To expand the fractional part means that instead of multiplying by multiples of 10, we are now multiplying by divisions of 10. For instance, 0.8234 = 8*0.1 + 2*0.01 + 3*0.001 + 4*0.0001(Only worry about doing this to 6 decimal places)
in C++ Take multiply and overload it such that it takes two vectors of doubles. Otherwise, it should do the exact same thing as our previous multiply function. We print the results of the whole and fractional parts of the multiply functions (234*34 =7956 and 0.654*0.2356 = 0.154082).
in C++ multiply the fractional part of number1 with the whole part of number2, and the whole part of number1 with the fractional part of number2. Continue to overload the multiply function such that it takes a vector of int anda vector of float.In other words...234*34 = 7956(multiply(vector v1, vector v2))234*0.2356 = 55.1204(multiply(vector v1, vector v2))34*0.654 = 22.236(multiply(vector v1, vector v2))0.654*0.2356 = 0.154082(multiply(vector v1, vector v2))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started