Calculate the multiplication and sum of two numbers
Given two integer numbers return their product only if the product is greater than 1000, else return their sum.
Given 1:
number1 = 20
number2 = 30
Expected Output:
The result is 600
Given 2:
number1 = 40
number2 = 30
Expected Output:
The result is 70
Hint:
product
variableproduct >1000
. If yes, return theproduct
Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer