216k views
5 votes
An algorithm is a step-by-step series of instructions that, when followed, produces a definite and desired result. At this stage, programmers write the instructions in an informal, English-like language instead of programming .

1 Answer

3 votes

Answer:

This method of informal English-like language is called Pseudo-Code.

Explanation:

Where words and English grammatical structure is used inplace of functions and variables.

Example being:

function Add

variable 1 + variable 2.

if variable 1 + variable 2 = desired variable

Do something good

end if

else

find out why

end else

end function

Would Translate to, in C#

public void Add(int var1, int var2, int var3)

{

var3= var1 + var2;

if(var3 = 1234)

{

return var3;

}

else

{

Console.WriteLine(var3);

return var3;

}

}

User Peter Bisimbeko
by
8.5k points