WHAT ARE PSEUDO-CODES ?
The pseudo- code is step by step representation written in plain english of an algorithm, which can be perceived as the initial stage of formal coding. Instead of directly digging upon the proper code, it is preferred to write pseudocode to get an essence of the logic applied in the algorithm.
Some of the conventions, keywords etc. followed while writing a pseudo-code are as follows :
1. 'input' keyword is used to take the input from the user.
2. 'display' keyword is used to show the result.
3. Mathematical expressions are used as we do normally.
4. For decision making constructs, 'if' , 'then', 'else' , 'else if' keywords are used.
5. When some statements are to be repeated for a known number of times, 'for', 'to', 'do', 'end for' keywords are used.
6. When some statements are to be repeated as long as some condition remains true then , 'while', 'end while' keywords are used.
No comments:
Post a Comment