Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started