Pseudocode

-It should write guess of the secret number to standard output.
-It should ask the user if the secret number is higher, lower, or if you guessed correctly.
-It should read the answer. Repeat the question if it is not one of three possible answers.
-It should claim victory if the answer is that the guess is correct.
-It should keep asking until it has a correct guess, or give up after 10 failed attempts.
-It should only accuse the player of cheating, if it is absolutely certain.
That's not Pseudocode, by the way.
http://en.wikipedia.org/wiki/Pseudocode

1
2
3
4
5
6
7
8
9
10
11
12
void function bizzbuzz
for (i = 1; i<=100; i++) {
    set print_number to true;
    if i is divisible by 3
        print "Bizz";
        set print_number to false;
    if i is divisible by 5
        print "Buzz";
        set print_number to false;
    if print_number, print i;
    print a newline;
}


As for your problem, you have to learn to do it all yourself.
That's not pseudocode either. You jumped right across from instructions to statements that may actually be valid in some language.
Pseudocode is an informal mixture of the language used and ordinary language.
1
2
if (x > y) then
     x is larger

Topic archived. No new replies allowed.