Electrofriends

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

by Ranjith | December 4th, 2008.

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 till [...]

Read More..

to find the gross and net salary

by Ranjith | December 4th, 2008.

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

Read More..

to find the roots of a quadratic equation

by Ranjith | December 4th, 2008.

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 out numerator- [...]

Read More..

To calculate area and circumference of the circle

by Ranjith | December 3rd, 2008.

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 concept [...]

Read More..

to find the biggest and smallest of three numbers

by Ranjith | December 3rd, 2008.

Here is an optimized program to find the largest and smallest among three entered numbers.
Logic : The entered three numbers N1, N2, N3 are compared in such an order, where the first comparison checks if  N1  largest. If so, prints it out and exists; if not so, it omits N1 from further comparison and checks [...]

Read More..

To calculate area and circumference of the circle

by Ranjith | November 6th, 2008.

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 concept [...]

Read More..
Copyright©2009 www.electrofriends.com All Rights Reserved. Powered by Dhyeya