Question: Write Java codeee - - - Write a program either in C or Java threads, which calculates the Euler's Phi-Function for the number 1001. The
Write Java codeee
-
-
-

Write a program either in C or Java threads, which calculates the Euler's Phi-Function for the number 1001. The Euler's Phi-Functions returns the number of elements that are co-prime to 1001. Co-prime to 1001 means that the Greatest Common Divisor of 1001 and number x, smaller than 1001 , is equal to 1. Example: Phi (6)=2. Because only two numbers smaller than 6 , have 1 as the Greatest Common Divisor with 6 , namely 1 and 5 . The other numbers smaller than 6, namely 2, 3 and 4, have 2 as the Greatest Common Divisor with 6. Pseudo Code for Greatest Common Divisor: GCD(a,b) if b==0 return a else return GCD(b,(a%b))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
