Algorithm







As you know that althoouugh a computer is versatile and powerful machine and can do a variety of things but still it doesn't know what to do on its own.Solving a problem on the computer can be quite a complex phenomenon. A user might make a mistake or forget some statements in solving the problem. thus toavoid any mistake in the program , it should be planned in advance. The loic of the problem shouuld be very clear before you undertake the work on commputer. Now, this logic can be faciliated by the use of an Algorithm or a Flowchart.

Algorithm


we write a program in computer using Programming Language like LOGO , COBOL,BASIC,PYTHON ,C while writing a computer a program we should be wel cofirmed in our mind  which steps shouldd be taken  and at which order. An algorithm is formal set of instruction that can be followed  to perform a specific task. These steps may be written in simple English.

1> Every instruction should be written in separate line.
2>The steps number should be mentioned before each instruction.
3>Be very sure that the instructions are in written in right order.

Let look at some examples to understand algorithms






Algorithm to Make Tea

Step-1 : Start 
Step-2 : Fill the kattel with water.
Step-3 : Plug the kettel into  the eletricity point.
Step-4 : Boil the water.
Step-5 : Fetch the cup.
Step-6 : Put a tea bag in the cup.
Step-7 : Pour boiling water in the cup.
Step-8 : Add sugar and stir.
Step-9 : Add milk and stir.
Step-10 : Take out the tea.
Step-11 : Stop.

Algorithm to add two numbers

Step-1 : Start.
Step-2 : Take two numbers  A and B.
Step-3 : Find their sum.
Step-4 : Print the result.
Step-5 : Stop


In this post, I have given you a basic knowledge about the Algorithm , in the next post I will tell you about the programs and the programming language. To refuse it, subscribe to this blog now.

thank you



Comments