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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment