Thursday, June 11, 2009

assignment 4

10 sys ("command.com /c cls")
11 print " what grade are you in?"
12 input num1
13 if (num1)= 9 then goto 40
15 if (num1)= 10 then goto 60
17 if (num1)= 11 then goto 80
19 if (num1)= 12 then goto 100
20 if (num1)> 12 then goto 120
30 if (num1)< 9 then goto 140
40 print " freshmen? sucks to be you right now"
50 goto 160
60 print " sophmore? have fun"
70 goto 160
80 print " junior? you have so much to do"
90 goto 160
100 print " senior? have fun!!!"
110 goto 160
120 print "sorry, cant tell you"
130 goto 160
140 print "sorry, i dont know what grade your in"
150 goto 160
160 end

assignment 3

10 sys ("command.com /c cls")
11 print " what grade are you in?"
12 input num1
13 if (num1)= 9 then goto 40
15 if (num1)= 10 then goto 60
17 if (num1)= 11 then goto 80
19 if (num1)= 12 then goto 100
40 print " freshmen? sucks to be you right now"
50 goto 160
60 print " sophmore? have fun"
70 goto 160
80 print " junior? you have so much to do"
90 goto 160
100 print " senior? have fun!!!"
110 goto 160
160 end

Wednesday, June 10, 2009

Basic IF

the if statement tells you if your statement is wrong or right

it can be use as a calculator

the guessing my number tells you if you have guessed a number right and if you guessed wrong then you have to keep guessing.

ex
10 sys ("command.com /c cls")
12 print "guess a number from 1-10"
14 input num1
20 IF (num1) = 9 THEN GOTO 50
30 PRINT " tight"
40 GOTO 60
50 PRINT " you got lucky "
60 end