Skip to content

A Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself.

Notifications You must be signed in to change notification settings

katarzynaadamczyk/Perfect_Number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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++.

About

A Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages