Essential features of an algorithm:
1.Input: The algorithm should take zero or more input.
2. Output: The algorithm should produce one or more outputs.
3. Definiteness: Each and every step of algorithm should be defined unambiguously.
4. Effectiveness: A human should be able to calculate the values involved in the procedure of the algorithm using paper and pencil.
5. Termination: An algorithm must terminate after a finite number of steps. Writing algorithms is an art so the language used to write algorithms should be simple and precise. Each and every step of the algorithm should be clear and unambiguous and should not convey more than one meaning to the programmer. A C language algorithm to obtain H.C.F. of two given positive integers is listed below:
{
r=a%b;
a=b;
b=r;
}
printf("H.C.F. of %d and %d = %d",h,k,a);
}