Question 1: (back)

Write a program that reads a line of characters from the user and displays that entire line after converting any upper case characters to lower case. All non-alphabetic and existing lower case characters should pass through unchanged; you should convert all upper case characters to lower case before printing them.

program Question1;

#include( "stdlib.hhf" );

begin Question1;
    stdout.put( "Enter a short line of text: " );
    stdin.flushInput();
    repeat
        stdin.getc();
        if( al >= 'A' ) then
            if( al <= 'Z') then
                xor( $20, al );
            endif;
        endif;
        stdout.putc( al );
    until( stdin.eoln() );
end Question1;