we write algorithms in step-by-step mannerbut it is not always the case algorithm writing is process and is executed after the problem domain is well-defined that iswe should know the problem domainfor which we are designing solution example let' try to learn algorithm-writing by using an example problem design an algorithm to add two numbers and display the result step start step declare three integers ab step define values of step add values of step store output of step to step print step stop algorithms tell the programmers how to code the program alternativelythe algorithm can be written asstep start add step get values of step step display step stop in design and analysis of algorithmsusually the second method is used to describe an algorithm it makes it easy for the analyst to analyse the algorithm ignoring all unwanted definitions he can observe what operations are being used and how the process is flowing writing step numbersis optional we design an algorithm to get solution of given problem problem can be solved in more than one ways