![if !IE]> <![endif]>
· “Pseudo” means initiation or false.
· “Code” means the set of statements or instructions written in a programming language.
· Pseudocode is also called as “Program Design Language [PDL]”.
· Pseudocode is a Programming Analysis Tool, which is commonly used for planning he program logic.
· Pseudocode is written in normal English and cannot be understood by the computer.
· Set of instructions that mimic programming language instructions
· An informal high-level description of the operating principle of a computer program. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading.
1. Write one statement per line
2. Capitalize initial keywords (READ, WRITE, IF, WHILE, UNTIL).
3. Indent to show hierarchy.
4. End multiline structure.
5. Keep statements language.
• It can be done easily in any word processor.
• It can be easily modified as compared to flowchart.
• Its implementation is very useful in structured design elements.
• It can be written easily.
• It can be read and understood easily.
• Converting a pseudocode to programming language is very easy compared with converting a flowchart to programming language.
• It is not visual.
• We do not get a picture of the design.
• There is no standardized style or format.
• For a beginner, it is more difficult to follow the logic or write pseudocode as compared to flowchart.
Problem 1: Calculate sum and average for n numbers.
INITIALIZE sum=0, i=1
FOR i <=n, then
COMPUTE sum = sum +i
COMPUTE avg = sum/n
PRINT sum, avg
Problem 2: Calculate area of circle
READ radius, r
CALCULATE Area=pi * r *r
Problem 3: Read Number n and print the integers counting upto n
INITIALIZE i to 1
FOR i <= n, then
Problem 4: Find the greater number between two numbers.
Read A, B
IF A is less than B
BIG = B
SMALL = A
BIG = A
SMALL = B
WRITE / DISPLAY BIG, SMALL
Problem 5: To determine a student whether successful or fail.
READ student ‘s grade
IF student's grade is greater than or equal to 50
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.