With this tutorial, readers will learn what algorithms are and will understand about them with the help of few examples.
In computer programming, an algorithm is a set of well-defined instructions to solve a particular problem. Algorithms takes input or input(s) and it produces the desired outputs.
For example,
An algorithm to add two numbers:
- Take two number inputs.
- Add numbers using the + operator.
- Display the result.
Qualities of a Good Algorithm
- Input and output variable should be defined precisely.
- Algorithm Steps should be clear and unambiguous.
- Algorithms should be effective in many different ways to solve a problem.
- An algorithm should only include pseudo codes and not computer code. Algorithm should be written in such a way that it can be understood even by someone who doesn’t understand programming and can be decoded in different programming languages.
Algorithm Examples to understand the pseudo code.
Algorithm for adding two numbers.
Algorithm for finding the largest among given numbers.
Algorithm for finding the factorial of a number.
Algorithm 1: Add two numbers entered by the user.

Algorithm 2: Find the largest number among given numbers.

Algorithm 3: Find the factorial of a number.

Hope you liked this tutorial, continue reading multiple articles on different categories here
