Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 684 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 684 Bytes

Perfect Number

This project solves two issues regarding summing the divisors of given number except for itself.

First issue: A Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. For instance, 28 = 1 + 2 + 4 + 7 + 14 Write a function to determine if a number is a perfect number.

Second issue: Find buddy pair in given constraints. Buddy pair is a pair of numbers (x, y) in which sum of divisors of x is equal to y + 1 and sum of divisors of y is equal to x + 1.

The project consists of main and a class Tnumberfractions. This class has static functions that solve problems stated above.

The project was written in C++.