Question: Write in pseudocode and do a flowchart of the code, thanks public class MyClass { public static void main(String args[]) { int [] aValues =
Write in pseudocode and do a flowchart of the code, thanks
public class MyClass { public static void main(String args[]) { int [] aValues = {8,19,11,20,65,81}; int [] bValues = {12,39,21,30,15,94}; int [] gcdValues = new int[aValues.length]; for(int i = 0; i <= aValues.length-1;i++){ int a = aValues[i]; int b = bValues[i]; int z = gcd(a,b); gcdValues[i] = z; System.out.println(gcdValues[i]); } } public static int gcd(int x, int y){ if(y==0){ return x; } else return gcd(y, x % y); } } 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
