0% found this document useful (0 votes)
4 views

What is Pseudocode

Pseudocode is a plain-language representation of an algorithm's steps, designed to be easily understood by both programmers and non-programmers. It helps in planning a program by focusing on logic rather than syntax and includes basic structures such as Start/End, Input/Output, processing, control structures, and optional comments. Examples illustrate its use in simple calculations, decision-making with if statements, and loops.

Uploaded by

ramdeensharona
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

What is Pseudocode

Pseudocode is a plain-language representation of an algorithm's steps, designed to be easily understood by both programmers and non-programmers. It helps in planning a program by focusing on logic rather than syntax and includes basic structures such as Start/End, Input/Output, processing, control structures, and optional comments. Examples illustrate its use in simple calculations, decision-making with if statements, and loops.

Uploaded by

ramdeensharona
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

What is Pseudocode?

Pseudocode is a plain-language description of the steps in an algorithm or program. It's not


written in any specific programming language—just a logical sequence of steps that represents
how a solution will work.

Why Use Pseudocode?

• Helps to plan a program before writing actual code.

• Easy to understand for both programmers and non-programmers.

• Focuses on logic, not syntax.

Basic Structure of Pseudocode

1. Start and End – Always begin with Start and finish with End.

2. Input and Output – Use:

o Input to accept values.

o Output or Display to show results.

3. Processing/Computation – Use assignment statements, e.g. Total = Price * Quantity

4. Control Structures:

o If statements: For decision making

o Loops: For repeating actions (e.g., For, While)

5. Comments – Optional notes using // to explain parts of the pseudocode.


Example 1: Simple Calculation

Problem: Calculate and display the area of a rectangle.

Pseudocode:

Start

Input Length

Input Width

Area = Length * Width

Display Area

End

Example 2: Using If Statement

Problem: Check if a number is positive or negative.

Pseudocode:

Start

Input Number

If Number > 0 Then

Display "Positive"

Else

Display "Negative"

End If

End

Example 3: Using a Loop

Problem: Display numbers 1 to 5.

Pseudocode:

Start

For Counter = 1 to 5

Display Counter

End For

End

You might also like