Computer Science, asked by amayra28, 10 months ago

explain the standard way of writing algorithm statement​


chitraksh68: please mark brainliest

Answers

Answered by chitraksh68
1

Answer:

menu

home

search

Algorithm in Programming

In programming, algorithm is a set of well defined instructions in sequence to solve the problem.

Qualities of a good algorithm

Input and output 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 Examples

Algorithm to add two numbers

Algorithm to find the largest among three numbers

Algorithm to find all the roots of quadratic equation

Algorithm to find the factorial

Algorithm to check prime number

Algorithm of Fibonacci series

Examples Of Algorithms In Programming

Write an algorithm to add two numbers entered by user.

Step 1: Start

Step 2: Declare variables num1, num2 and sum.

Step 3: Read values num1 and num2.

Step 4: Add num1 and num2 and assign the result to sum.

sum←num1+num2

Step 5: Display sum

Step 6: Stop

Write an algorithm to find the largest among three different numbers entered by user.

Step 1: Start

Step 2: Declare variables a,b and c.

Step 3: Read variables a,b and c.

Step 4: If a>b

If a>c

Display a is the largest number.

Else

Display c is the largest number.

Else

If b>c

Display b is the largest number.

Else

Display c is the greatest number.

Step 5: Stop

please mark brainliest

Answered by saima54
0

the program must write down in minute and detailed

keep in mind that algorithm is a step by step process

depending upon programming languages includes syntax where necessary

begin

include variable and their usage

if there any loops , try to give sub number lists

Similar questions