Saturday, August 10, 2019

Algorithms

Algorithms
Algorithms:-
1. Algorithms is defined as sequence of instruction to perform a specific task.
2. Algorithm is the step by step procedure to solve any problem.
3. It is always written in simple language and it should be very clear and well defined.
 Algorithms

Rules of algorithms:-
1. Algorithm always began with the word "start".
2. Always write the statement clearly.
3. Always give the statement number to each interval as step1,step2,step3...step n.
4. Include variable and their was where every number needed.
5. Always write each statement i n separate line.
6. Algorithm always end with the word "stop".
7. The function of each statement should be very clear and well defined.
Example :-
write an algorithm to calculate the sum of two number .
step 1:- start 
step 2:- read a and b 
step 3:- sum = a+b 
step 4:- print sum 
step 5:- stop
Program of Sum  of  2 number : Click Here

No comments:

Post a Comment