2. There are no set rules for writing
pseudocode, but you will often see the
following:
• INPUT – indicates a user will be inputting something
• OUTPUT – indicates that an output will appear on the
screen
• WHILE – a loop (iteration that has a condition at the
beginning)
• FOR – a counting loop (iteration)
• REPEAT – UNTIL – a loop (iteration) that has a
condition at the end
• IF – THEN – ELSE – a decision (selection) in which a
choice is made
• any instructions that occur inside a selection or
iteration are usually indented
3. A flowchart is a type a diagram that uses
shapes and arrows to represent an
algorithm.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33. Algorithms can be expressed in natural language or in pseudocode,
text that describes the steps a program might carry out. These
languages for human understanding may help write the algorithm in a
programming language.
Pseudocode:
Input: An integer Limit
Ouput: Two integers: Number and Sum
1. Enter Limit
2. Set Number = 0.
3. Set Sum = 0.
4. Repeat the following:
a. If Sum > Limit, terminate the repitition,
otherwise.
b. Increment Number by one.
c. Add Number to Sum and set equal to Sum.
5. Print Number and Sum.