Wednesday 5 December 2018

Pseudocode


Pseudocode
  • Pseudocode is a method of describing computer algorithms using a combination of natural language and programming language .
  • The pseudocode is just the algorithm written by using programming language syntaxes.
  • Pseudo code ia an artifical and informal language that helps programmers develop algorithms. Pseudo code is very simillar to everyday english.
  • Pseudocode is a "text-based" detail (algorithmic) design tool.
Example:
  1. Write the pseudocode for calculating the area of circle.
Solution:
1. Scan radius.
2. Area=3.14*radius*radius.
3. Print radius;
4. Stop.
  1. Write the pseudo code for print the maximum number between two numbers.
Solution:
1. Input a and b.
2. If a>b then
3. Print a
4. Else
5. Print b.
6. End

No comments:

Post a Comment