Question: please show work along with answer Consider the following two methods./** Precondition n1 > 0 * n2 > 0 public static int method0207a (int n1,

 please show work along with answer Consider the following two methods./**please show work along with answer

Consider the following two methods./** Precondition n1 > 0 * n2 > 0 public static int method0207a (int n1, int n2) {int temp = method0207b (n1, n2); return n1/temp * 2;}/** Precondition: p > 0 * q > 0 */public static int method0207b (int p, int q) {int rem = 1; int k = 0; while (rem ! = 0) {rem = p % q; if (rem == 0) {k = q;} else {p = q; q = rem;}} return k;} What value is returned as a result of the call method0207a (30, 45)? (A) 30 (B) 45 (C) 90 (D) 150 (E) 450

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!