Tuesday, February 10, 2015

Pseudocode Assignment

1) What is pseudocode?

                Pseudocode is a detailed description of what a computer program or algorithm must do, expressed in a formally-styled natural language rather than in a programming language.


Pseudocode:

IF today is Monday THEN
        Roll a dice/Randomize 1 to 6.
        IF {1,2,3,4} THEN set A
        IF {5} THEN set B
        IF {6} THEN set C
IF today is Tuesday or Wednesday or Thursday or Friday THEN
        Roll a dice/Randomize 1 to 6.
        IF {3,4}and the last day is different from B & C THEN set B
        ELSE set A
        IF {5,6}and the last day is different from C THEN set C
        IF {1,2} THEN set A


PDF