C/C++ Programms

No Comments

Program to find the perfect numbers below a given number.

The program is to find all the perfect numbers in the range, which starts from zero and ends at user defined limit. A perfect number is a one, whose sum of devisors is equals the number itself. Logic: This is a slightly modified version of the previous program. Here, user need to enter the number […]

1 Comment

To find the fibonacci numbers below a given number.

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 […]

No Comments

Program to find the fibonacci numbers between a given range

Here is the slightly modified version of the previous program, which is flexible to find the Fibonacci numbers between the given range. Logic:  Fibonacci numbers are the the members of the Fibonacci series, which grows up accord to Fibonacci rule. The rule states, the present number in the series is the sum of past number […]

No Comments

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 […]

2 Comments

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 […]

1 Comment

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 […]

4 Comments

To find the biggest and smallest number and positions in the given array

This program deals with finding the largest and smallest magnitude in an array.  The program asks the user to enter the dimension of the integer array, which he can enter soon after that. Logic: The entered array is traced through the dimension. Initially the program assumes the first member is the smallest and the greatest […]

No Comments

to find the gross and net salary

Here is a simple  program which finds the Gross and Net pay of an employ when the user enters his basic salary. Logic : Here we divided the the employee into three categories according to his basic pay. The first category is getting the basic pay less than Rs.5000/-. Second category is having the basic […]

2 Comments

to find the roots of a quadratic equation

Every Quadratic equation has two roots. And this program is implemented to find the roots of the entered quadratic equation. Logic : The roots of any quadratic equation of the the form, are, The same equation is computerized here. The program asks user to enter the three coefficients a, b and c. Then it finds […]

No Comments

To calculate area and circumference of the circle

Let us start from the beginning. Here discusses a model program for calculating the circumference and the area of the circle, where the radius is specified by the user. Logic: As we know, Circumference is ‘Pi’ times diameter of the circle and Area is ‘Pi’ times the radius squared. Implementing the same is the main […]