Number Programs

Program for Fibonacci numbers

Program describes an easy way to find the Fibonacci numbers below a given number. Logic:  Fibonacci numbers are the the numbers fall on the Fibonacci series, which grows up accord to Fibonacci rule. The rule is that, the present number in the series is the sum of past number and the number before last. The […]


Program for perfect numbers

Here is a program to find whether the entered number is a perfect or not. A perfect number is a one, whose sum of devisors is equals the number itself. Logic: Here in the program, user need to enter the number to check if it is perfect. The for loop in the program traces the […]


Program for prime numbers

Here is a program to find whether the entered number is a prime or not. A prime number is a one, whose divisors are 1 and the number itself. Logic: The program expects the user to enter the number to check for prime property. The for loop in the program traces the iteration till the […]