program hello_world; {program name} uses crt; {you need this to use clrscr} var {hey we have some varibles coming up} name: string[7]; {name input var - can be up to 7 char} number1:integer; {first number input var - has to be an integer} number2:integer; {second number input var - has to be an integer} answer:integer; {what the user inputs as the answer - has to be an integer} sum:integer; {the correct answer of number1 added to number2} begin {states the gegiining of the program} clrscr; {clears the screen} writeln (' H H E E E E E L L O O O O O'); writeln (' H H E L L O O'); writeln (' H H E L L O O'); writeln (' H H H H H H E E E E E L L O O'); writeln (' H H E L L O O'); writeln (' H H E L L O O'); writeln (' H H E E E E E L L L L L L L L L L O O O O O'); writeln (' ==============================================================='); {all those writeln's write up on the screen what I have in between the single quotes} {spells HELLO} readln; {pause until user hits enter} writeln; {blank line} writeln (' BY'); writeln (' Rich Jacob'); writeln; writeln; writeln; writeln; writeln (' W W O O O O O R R R R R L D D D'); writeln (' W w O O R R L D D'); writeln (' W W W O O R R R R R L D D'); writeln (' W W W W O O R R L D D'); writeln (' W W O O O O O R R L L L L L D D D'); writeln (' ===================================================================='); {spells WORLD} readln; {pause until enter is hit} clrscr; {clears the screen} writeln(' ----------------------------------------------|'); writeln(' / \ |'); writeln(' / \ |'); writeln(' / \ |'); writeln(' / \ |'); writeln(' /----------\----------------------------------------|'); writeln(' | | |'); writeln(' | | !~~~|~~~! !~~~|~~~! |'); writeln(' | | !---|---! !---|---! |'); writeln(' | | !___|___! !~~~~~~~! !___|___! |'); writeln(' | | ! ! |'); writeln(' | | ! + ! |'); writeln(' | | ! ! |'); writeln(' |------------!-------!------------------|'); writeln(' 000000'); writeln(' 000000000000'); writeln(' 000000000000000000'); writeln(' 000000000000000000000000'); writeln(' 000000000000000000000000000000'); writeln(' 000000000000000000000000000000000000'); writeln; writeln; writeln; {Draws a house} writeln('Press [enter] to come inside our little school house.');{Tells user to press enter} readln; {Pause until you hit enter} clrscr; {clears screen} writeln ('Hello. Welcome to our class. What is your first name?'); {Tells user to input first name} readln (name); {reads first name - declares name var to be what was just inputted} writeln ('Class say hello to our new friend, ',name); {displays statemnet with name at end} writeln (name,', Today were going to be studying math.');{displays statement with name in beginning} writeln ('Give me a number 1 thru 10, ',name);{displays request with user name at end} Writeln ('Now ',name,', please only give us a number 1 thru 10. This is only first grade.');{re-emphasizes request} readln (number1);{reads input and stores it as variable number1} writeln ('Now give me another number now, 1 thru 10.');{displays request} readln (number2);{reads input and stores it as variable number2} sum := number1 + number2 ; {variable sum = variable number1 + variable number2} writeln (name,', What do you get when you add those two numbers together?');{requset with users name at beginning} readln (answer);{reads input and stores it as variable answer} writeln ( number1, ' + ' , number2, ' = ' ,sum ); {displays variable number1 + variable number2 = variable sum} if answer = sum then {if variable answer = variable sum then do this} writeln('Very good, ',name,'! You get an A, and believe me you need one'); {name, statement of congratulations} if answer = sum then {if variable answer = variable sum then do this} writeln('or your G.P.A. will go down, and then CREOL will laugh at you when you'); {subliminal plea for an A} if answer = sum then {if variable answer = variable sum then do this} writeln('ask them for money in a few years.'); {subliminal plea for an A} if answer <> sum then {if variable answer <> variable sum then do this} writeln('Sorry ' ,name,','); {Statement with name at end} if answer <> sum then {if variable answer <> variable sum then do this} writeln('You are a loser [class laughs at you as they will many times again.]'); {feel sorry for me and give me an A line} if answer <> sum then {if variable answer <> variable sum then do this} writeln('But do not worry because eventually you will get used to it.'); {laugh anyway so I can get the extra point} writeln; {blank line} writeln; {blank line} writeln; {blank line} writeln; {blank line} writeln; {blank line} writeln ('Press [enter] to end class.'); {tells user to press enter to escape} readln; {pause until enter is hit} end. {The end of the program. it's over man. that's it. there is no more}