Two positive integers are called amicable if the sum of divisors of the first is equal...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of the divisor of the second. Write a program to test if 2 integer numbers are amicable. For example, 220 and 284 are amicable since the sum of divisors is 504 for both integers as shown below: sum of divisors of 220=1+2+4+5+10+11+20+22+44 +55 + 110 + 220 = 504. sum of divisors of 284 = 1+2+4+71 + 142 +284 = 504. Sample Run 1: Enter two integers: 220 284 220 and 284 are amicable Sample Run 2: Enter two integers: 220 110 220 and 110 are not amicable. Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of the divisor of the second. Write a program to test if 2 integer numbers are amicable. For example, 220 and 284 are amicable since the sum of divisors is 504 for both integers as shown below: sum of divisors of 220=1+2+4+5+10+11+20+22+44 +55 + 110 + 220 = 504. sum of divisors of 284 = 1+2+4+71 + 142 +284 = 504. Sample Run 1: Enter two integers: 220 284 220 and 284 are amicable Sample Run 2: Enter two integers: 220 110 220 and 110 are not amicable.
Expert Answer:
Answer rating: 100% (QA)
The image contains a description of what amicable numbers are along with an example and two sample r... View the full answer
Related Book For
Probability and Random Processes With Applications to Signal Processing and Communications
ISBN: 978-0123869814
2nd edition
Authors: Scott Miller, Donald Childers
Posted Date:
Students also viewed these programming questions
-
1. A car manufacturing company is considering two methods to install its new production line: semi-automated and full-automated. The estimates for each method are shown below. Semi-Automated...
-
A researcher wanted to find out if there was difference between older movie goers and younger movie goers with respect to their estimates of a successful actors income. The researcher first...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Mark Hurd has just assumed the top job at H-P. He has asked you as a staff VP to draw up a course of action to get the ailing PC division up to competitive parity with Dell. If you need to make some...
-
For the years 2013-2015, Robbins Soccer Company had net income and average shares outstanding as follows: What was the percentage of change in earnings per share (EPS) in 2014? In 2015? 2015 2014 313...
-
The Hartford Symphony Guild is planning its annual dinner-dance. The dinner-dance committee has assembled the following expected costs for the event: Dinner (per person)$10Favors and program (per...
-
Which of the following is least likely to be a reason why the career paths available to information systems auditors are often limited? a. Many organizations have only a few information systems audit...
-
Jim Haught, D.D.S., opened an incorporated dental practice on January 1, 2014. During the first month of operations, the following transactions occurred. Performed services for patients who had...
-
1. Find the support reactions for the cantilever beam at A. 15 kN/m 2. 3. 5 kN/m 8 m Find the forces in members AB and AF using the method of sections. 3 m B 2 m 2 m 2 m 12 kN 12 kN 12 kN Find the...
-
Greenville has provided the following information from its General Fund Revenues and Appropriations/ Expenditure/Encumbrances subsidiary ledgers for the fiscal year ended. Assume the beginning fund...
-
Celebrimbor invests $23,000 at 14% compounded scmi-annually on August 12, 2022. (a) (16 points) How much is the investment worth on October 12, 2028, assuming simple interest is used for a part of a...
-
Flounder Corporation makes a mechanical stuffed alligator that sings the Martian national anthem. The following information is available for Flounder Corporation's anticipated annual volume of...
-
Shown below are totals of the three sections from the SCF for the Sivad Motel for the year just ended. Analyze this information and prepare a report indicating your opinion regarding its sources and...
-
What's organizational structure? Also, how does the organizational structure affect internal politics within the firm?
-
Noelle, the owner of all of the shares of ClockCo, an S corporation, transfers her stock to Grayson on April 1. ClockCo reports a $165,000 NOL for the entire tax year, but only $24,750 of the loss...
-
1. Consider the equation ze + sin(ry) + y - In(2)-0. Find the value of dy/dr at the point (0, in 2). 2. Consider the equation sin(x + y) + sin(x+2)+ sin(y+ 2) = 0. Find the values of 8z/0x and Oz/0y...
-
4. Given values of a, b, and c as shown, write the result of expressions shown below. Assume: a is [3:0], bis [3:0], cis [5:0] Assume: a = 4'b0010, b=4'b1010, c = 6'b001101 Evaluate the following...
-
Do animals have rights? If so, what are they? What duties do human beings have toward animals? Does KFC protect animal welfare at an acceptable level?
-
Two random variables have a joint Gaussian PDF given by Find E [X], E [Y], Var (X), VAr (Y), X,Y, Cov (X,Y), and E[XY]. 3x3 3y2 4xy 14 16y +7 /ky(x,y) = 6.5 exp
-
Let X (t) = A(t) cos (0t + ), where A(t) is a wide sense stationary random process independent of and let be a random variable distributed uniformly over . Define a related process Y (t) = A (t)...
-
A random variable is equally likely to take on any integer value in the set {0, 1, 2, 3}. (a) Sketch the CDF of X fx (x). (b) Write fx (x) analytically in terms of unit step functions.
-
Describe how nonprofits intersect with your daily life.
-
If auditors are seeking to detect whether fraud has caused material misstatements in the accounts, data mining most likely will be used to assist them to: a. Extract data from an object-oriented...
-
What circumstances might influence the growth or shrinkage of the nonprofit sector?
Study smarter with the SolutionInn App