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...
-
What three things should a firm do about disaster recovery planning for office PCs?
-
Why would it be a dangerous mistake for a bungee jumper to use a steel cable instead of an elastic cord?
-
Draw a subgraph of Graph \(F\) from Figure 12.3 that has exactly four vertices and five edges. Graph G d hi g Multigraph H Figure 12.3 A Graph and a Multigraph
-
At the beginning of 2012, Callaway Company acquired a mine for $850,000. Of this amount, $100,000 was ascribed to the land value and the remaining portion to the minerals in the mine. Surveys...
-
Please show all work, step by step. Thank you so much! Evaluate the following integrals. 2 5. 10 pts dx x2+6x+5 6. (10 pts) | sin*(x)dx
-
Consider the following three liquid mixtures. A. Water + n-propane B. n-hexane + benzene C. Ortho-xylene + para-xylene Which mixtures, if any, do you expect to behave as an ideal solution and why?...
-
Panthers Corp., a U.S. importer of wine, placed an order with anItalian wine producerfor 1,000,000 bottles, at a price of Euro 15 per bottle. Relevantexchange rates are:Date Spot Rate Forward Rate 2...
-
3-A Novak Djokovic wants to start a tennis academy in India and is looking for funding options. He finds that the interest rates in India are around 12% per annum. Lenders in his parent country,...
-
The IKEA Group, a Swedish company founded in 1943 with its headquarters in Denmark, is a multinational operator of a chain of stores for home furnishing and housewares. It is the world's largest...
-
Business Communication 1. What is Management Report? Cite an example of it. 2. What is an Operational Report? Cite an example of it. 3. What is Investigative Report? Cite an example of it. 4. What is...
-
Coke's most recent dividend was $1. Dividends are expected to grow by 15% for the next two years which would lead to dividends of $1.15 at time 1 and $1.32 at time 2. After that, dividends are...
-
Adger Corporation is a service company that measures its output based on the number of customers served. The company provided the following fixed and variable cost estimates that it uses for...
-
Suppose that Xtel currently is selling at $60 per share. You buy 400 shares using $15,000 of your own money. borrowing the remainder of the purchase price from your broker. The rate on the margin...
-
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.
-
Overtime pay for a production department Curry Company employs nine production workers at $7.00 per hour for first shift and a 50 percent overtime premium for any hours worked in excess of 40 per...
-
Understanding inventory cost data Data relevant to Job No. QV1173 are: An analysis of the production data indicate a number of additional items as follows: a. In addition to the 200 good units, there...
-
Identifying errors in accounting for materials Ristlott Company is a small manufactur- ing company using a perpetual inventory system. Recently the company hired an accountant who has not worked for...
Study smarter with the SolutionInn App