aboutsummaryrefslogtreecommitdiff
path: root/cst116-ch10-debugging-wilson-pseudo-code.txt
blob: 0c8ab5a9e4c185b3bd99cd82c72b7d7cf4d77f8f (plain) (blame)
1
2
3
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
With first name in row 0, last name in row 1

DISPLAY "Please enter your first name: ";
READ name[0];

DISPLAY "Please enter your last name: ";
READ name[1];

DISPLAY "Welcome " name[0] " " name[1] "!   Hope all is well";

FOR (int x = 0; x < SIZE; x++);
        varX[x] = x;

FOR x = 0, IF x < SIZE, x++;
        varY[x] = x + 100;


SET varX[1] = { 99 };

FOR x = 0, IF x < SIZE, x++;
    varZ[x] = varX[x] + varY[x];


DEFINE int x;

DISPLAY " \t  x \t  y  \t  z\n\n";

    for (x = 0; x < SIZE; x++);
        DISPLAY << "\t" << set width(3) << varX[x] "\t " << varY[x] "\t " << varZ[x] << endl;