sujana-kamasany / javacodes

A repository that will guide in making your first contribution.
30 stars 109 forks source link

Peterson Number in Java #65

Open sujana-kamasany opened 2 years ago

sujana-kamasany commented 2 years ago

Java Program to check whether a given number is Peterson or not through a Java program.

Peterson Number

A number is said to be Peterson if the sum of factorials of each digit is equal to the sum of the number itself.

Number = 145

145 = !1 + !4 + !5

=1+4321+5432*1

=1+24+120

145=145

We observe that the number and the sum of factorials of digits are equal to the number itself. Hence, 145 is a Peterson number.

TaeyeonRoyce commented 2 years ago

Please, assign me! I'd like to solve this!

sujana-kamasany commented 2 years ago

Please, assign me! I'd like to solve this!

@TaeyeonRoyce Assigned, Thank you for contributing