Source Codes

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


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


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


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


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


to find the biggest and smallest of three numbers

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


Intelligent Train Engines

The idea is whenever any engine observes a red signal on its track it will start decreasing its speed gradually and stops automatically at some distance from the signal pole. After then when it gets green signal the driver can manually start the train and go on.


Robotic car using 8951 Microcontroller

Robotic Car is a miniature prototype car powered by batteries whose various movements can be control either manually or automatically, or the combination of both.


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