Question 3 (30 pts] Write a Java program that takes two integer numbers, which are X and Y. Then, your program should fi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Question 3 (30 pts] Write a Java program that takes two integer numbers, which are X and Y. Then, your program should fi

Post by answerhappygod »

Question 3 30 Pts Write A Java Program That Takes Two Integer Numbers Which Are X And Y Then Your Program Should Fi 1
Question 3 30 Pts Write A Java Program That Takes Two Integer Numbers Which Are X And Y Then Your Program Should Fi 1 (48.74 KiB) Viewed 40 times
Question 3 (30 pts] Write a Java program that takes two integer numbers, which are X and Y. Then, your program should find and output whether these numbers are friendly number or not. Friendly numbers are two different integers such that same number can be obtained by dividing the sum of the divisors to the numbers itself. For example: 6 -> divisors (1,2,3,6) 28->divisors(1,2,4,7,14,28) 1+2+3+6 1+2 +4 + 7 + 14 + 28 = 2 6 28 6 and 28 are friendly numbers. Case 1: Enter number 1: 6 Enter number 2: 28 They are friendly numbers Case 2: Enter number 1: 30 Enter number 2: 140 They are friendly numbers Case 3: Enter number 1: 3e Enter number 2: 161 They are not friendly numbers
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply