Question: Write a method times which calculates and returns the multiplicative product of its two arguments which we will refer to as a and b (your

 Write a method times which calculates and returns the multiplicative product

Write a method times which calculates and returns the multiplicative product of its two arguments which we will refer to as a and b (your method will calculate a times b, also written a b). However, you can't use the * operator! Instead, use a loop that adds a over and over again, similar to the pow method from class. (The loop could instead add b over and over again.) You do not need to worry about negative a or b but your code should work for positive or zero values. X 1 tima

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!