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

Write a method times which calculates and returns the multiplicative product of its two argument 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. (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.

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!