Computer Science, asked by appu5185, 3 months ago

define the therm Algorithm?​

Answers

Answered by MrTSR
2

Algorithm

• An algorithm is a procedure for solving a problem.

• It is one of the basic tool used for solving problem.

• It is the solution and finite number of process, if followed properly, will solve the problem.

• It is essential because they serve as the systematic procedures that computers require.

• It should be simple and clear and give a precise solution with a finite number of steps.

• It can be written in natural language as it can be easily understood.

• It should not have computer códe, but can be used in similar programming languages.

Example

Q. Write an algorithm to add two numbers.

Step 1: Get the two numbers. Let us say 1 and 2.

Step 2: Store the first number into one variable (say x) and the second number into  another variable (say y).

Step 3: Add the two numbers and store the value into a third variable (say sum).

Step 4: Display the number in the variable sum.

i.e., sum= x + y

= 1 + 2

Thus, sum = 3.

Similar questions