Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++ 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 multiplying these vectors together. HINT: A double loop will be involved! You need to multiply every combination of numbers together and add the result

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

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_2

Step: 3

blur-text-image_3

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

=+f) Are any six points in a row increasing (or decreasing)?

Answered: 1 week ago