Algorithm
Author: Ravi Poswal
A set of sequential steps usually written in Ordinary Language to solve a given problem is called Algorithm.
Steps involved in algorithm development
Step1. Identification of input
Step2: Identification of output
Step3: Identification the processing operations
Step4: Processing Definiteness
Step5 : Processing Finiteness
Step6 : Possessing Effectiveness
Code Example
Example: 1. Suppose we want to find the average of three numbers, the algorithm is as follows
Step 1 Read the numbers a, b, c
Step 2 Compute the sum of a, b and c
Step 3 Divide the sum by 3
Step 4 Store the result in variable d
Step 5 Print the value of d
Step 6 End of the program
Code Example
2. Write an algorithm to find the largest of three numbers X, Y,Z.
Step 1: Read the numbers X,Y,Z.
Step 2: if (X > Y)
Big = X
else BIG = Y
Step 3 : if (BIG < Z)
Step 4: Big = Z
Step 5: Print the largest number i.e. Big
Step 6: Stop.
RANREV INFOTECH