Question: Given the following code, mark the lines you would change / update for this method can correctly calculate the exponential / power For example, do
Given the following code, mark the lines you would changeupdate for this method can correctly calculate the exponentialpower
For example,
dosomething; should return
dosomething; should return
public static int dosomething int val int val
if valz
return ;
return val dosomething vall, val;
change dosomethingval val
change to
No changes, it is correct as it is
change return to return
change dosomethingval val
cast val to a double
change to
change dosomethingval val
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
