Thursday, June 11, 2009

class year

10 sys("command.com /c cls")
20 print "What year of high school are you in?"
30 input year
40 If (year) =1 then goto 80
50 If (year) =2 then goto 100
60 If (year) =3 then goto 120
70 If (year) =4 then goto 140
80 print "yo Freshman!"
90 goto 160
100 print "yo Sophmore!"
110 goto 160
120 print "yo Junior!"
130 goto 160
140 print "yo Senior!"
150 goto 160
160 end

Wednesday, June 10, 2009

if statement

THE if statement is too make sure the certain statement is correct, and easy example is 1+1=2 if the statement is compared to a statement is true and saying 1+1=3 it will end the program and it will end the program instead of going to the congratulations. It can be used for a calculator programming and it can be used for a computer online test.

10 sys("command.com /c cls")
12 print "give a number"
14 input num64
16 print "give a number"
18 input num26
20 IF (num64+num26) = 90 THEN GOTO 50
30 PRINT " The IF statement is false "
40 GOTO 90
50 PRINT " The IF statement is true "
60 goto 70
70 print " congratz"
80 end
90 print " GUess Again...... so wut up"
100 END