
-----------------------------------
dhyanp11
Mon Feb 29, 2016 10:05 pm

Indent Problem on Guessing Game
-----------------------------------
loop 
    % var Font : int 
    % Font := Font.New ("courier :10) 
    % Font.Draw ("Guess the Number!", 10, 475, Font, black) 
    % Draw.Box (5, 468, 215, 497, black) 
    
    var l : int := Rand.Int (1, limit) % Generates the number that the user is trying to guess 
    Text.Locate (5, 1) 
    put "Guess the number! It's between 1 and 100." 
    loop 
        loop 
            get input 
            if strintok (input) then 
                z := strint (input) 
                exit 
            else 
                put "That's not a number!" 
                delay (1000) 
                clearall 
                Text.Locate (5, 1) 
                put "Guess the number! It's between 1 and 100." 
            end if 
        end loop 
        if z = l then 
            put "Congratulations! You guessed correctly!" 
            exit 
        else if z > l then 
            put "Try guessing lower. Keep on going." 
        else if z < l then 
            put "Try guessing higher. Keep on going." 
        end if
        put "It took you " .. 
        put counter .. 
        put " guesses to guess the correct number!" 
        if counter = 1 then 
            put "Start buying lottery tickets!" 
        else if counter 