Question: Write a function add that takes two integers as inputs, then returns the sum of two integers. Write a second function multiplication that uses the

Write a function add that takes two integers as inputs, then returns the sum of two integers.
Write a second function multiplication that uses the sum function to perform multiplication. You are not allowed to use the multiplication operator.
For example:
Test Input Result
cout << sum(a,b)<<""<< mult(a,b)<< endl;
int a =3, b =4;
712

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!