10 sys("command.com/c cls")
20 print "What grade are you in? If your a Freshman type 1. If your a Sophomore type 2. If your a Junior type 3. If your a Senior type 4."
30 input Num1
40 IF Num1 = 1 then goto 50
41 if Num1 > 4 then goto 112
42 IF Num1 = 2 then goto 70
43 if Num1 < 1 then goto 112
44 If Num1 = 3 then goto 90
46 If Num1 = 4 then goto 110
50 print "So your a Freshman. Haha!"
60 goto 120
70 print "So your a Sophomore. Cool!"
80 goto 120
90 print "So your a Junior. Awesome!"
100 goto 120
110 print "So your a Senior. Lucky!"
111 goto 120
112 print "Incorrect number please choose number between 1-4."
113 goto 30
120 end
Thursday, June 11, 2009
Assignment 3
10 sys("command.com/c cls")
20 print "What grade are you in? If your a Freshman type 1. If your a Sophomore type 2. If your a Junior type 3. If your a Senior type 4."
30 input Num1
40 IF Num1 = 1 then goto 50
42 IF Num1 = 2 then goto 70
44 If Num1 = 3 then goto 90
46 If Num1 = 4 then goto 110
50 print "So your a Freshman. haha!"
60 goto 120
70 print "So your a Sophomore. cool!"
80 goto 120
90 print "So your a Junior. awesome!"
100 goto 120
110 print "So your a Senior. Lucky!"
120 end
20 print "What grade are you in? If your a Freshman type 1. If your a Sophomore type 2. If your a Junior type 3. If your a Senior type 4."
30 input Num1
40 IF Num1 = 1 then goto 50
42 IF Num1 = 2 then goto 70
44 If Num1 = 3 then goto 90
46 If Num1 = 4 then goto 110
50 print "So your a Freshman. haha!"
60 goto 120
70 print "So your a Sophomore. cool!"
80 goto 120
90 print "So your a Junior. awesome!"
100 goto 120
110 print "So your a Senior. Lucky!"
120 end
Wednesday, June 10, 2009
Basic if
The if statement on basic states if the problem that you wrote is true or false. When you write a problem it will either say "the if statement is true" or it will say "the if statement if false".
It can be used as a calculator. It can be used in businesses that need to add up there money. It can also be used for kids that need to work that require if statements.
A working if statement- its a guessing the number if statement
Assignment 5
10 sys("command.com/c cls")
20 print "Guess a number between 1-10"
30 input Num1
40 IF num1 = 7 then goto 70
50 print "Sorry you got it wrong"
60 goto 20
70 print "Yay you got it right!!!"
80 end
It can be used as a calculator. It can be used in businesses that need to add up there money. It can also be used for kids that need to work that require if statements.
A working if statement- its a guessing the number if statement
Assignment 5
10 sys("command.com/c cls")
20 print "Guess a number between 1-10"
30 input Num1
40 IF num1 = 7 then goto 70
50 print "Sorry you got it wrong"
60 goto 20
70 print "Yay you got it right!!!"
80 end
Wednesday, May 13, 2009
Slide Sorter view
Subscribe to:
Comments (Atom)