Basic of Algorithm : Start Writing Algorithm

Basic of Algorithm : Start Writing Algorithm

  • Algorithm are the set of well defined instruction in sequence to solve a problem.
  • This is a instruction written in English language,  step by step to solve the problem
  • An algorithm should always have a clear stopping point.
  • Inputs and outputs should be defined precisely.
  • Each steps in algorithm should be clear and unambiguous.
  • Algorithm should be most effective among many different ways to solve a problem.
  • An algorithm shouldn’t have computer code. Instead, the algorithm should be written in such a way that, it can be used in similar programming languages.
  • Algorithm is not the computer code. Algorithm are just the instructions which gives clear idea to you idea to write the computer code.
  • Algorithm is a written logic to run a program

algorithms example
algorithms example

Examples Of Algorithms

Write an algorithm to add two numbers entered by user.

Step 1: Start
Step 2: Define three variables num1, num2 and sum.
Step 3: Get the data in num1 and num2 variables.
Step 4: Add num1 and num2 and assign the result to sum.
Step 5: Display sum
Step 6: Stop


[xyz-ihs snippet=”Discuss”]

Leave a Reply