I've been coding a small program for visual basic (Yes it's not a great language but I figured I'd at least give it a try), and I've stumbled upon a small problem.
Now, the code works fine until section 6 where the outputs stop showing and the program closes itself. I'm sure I've missed something obvious and so I'm asking you, any help would be apprecaited.
Name:
Anonymous2011-03-12 7:38
why VB, just why..
Name:
Anonymous2011-03-12 7:40
Got a book on it for Christmas, decided I would at least try to do some programs with it. It's gone well up until this point.
Name:
Anonymous2011-03-12 8:38
I found the problem: You're using VB.
Name:
Anonymous2011-03-12 9:29
Everyone complains about the use of VB because they have been brainwashed by freetards.
>>9 VB is a terrible language and just looking at it makes me want to die. Dim Number As Integer
Number = InputBox("Please enter your age")
If (Number > 50) Then
MsgBox "you are older than 50"
ElseIf (Number < 20) Then
MsgBox "you are younger than 20"
Else
MsgBox "your age is between 20 and 50"
End If
Please go die.
Name:
Anonymous2011-03-12 14:09
10 PRINT "HAVE YOU READ YOURDIJKSTRA TODAY?" 20 GOTO 10
Name:
Anonymous2011-03-12 14:36
>>9
You are a terrible person and just looking at you makes me want to kill you.
>>11
I don't know how many of you have ever met Dijkstra, but you probably know that arrogance in computer science is measured in nano-Dijkstras.
-- Alan Kay on arrogance.
This thread has been closed and replaced with the following one; implement >>10 in language of your choice.
number=input('please enter your age')
if number > 50:
print 'you are older than 50'
elif number <20:
print 'you are younger than 20'
elif number<50 and number >20:
print 'your age is between 20 and 50'
else print
putStrLn "please enter your age" >> readLn >>= \x -> (putStrLn $ ["you are younger than 20", "your age is between 20 and 50", "you are older than 50"] !! (length $ takeWhile (<x) [20,50]))
10 INPUT "PLEASE ENTER YOUR AGE"; N
20 IF N > 50 GOTO 60
30 IF N < 20 GOTO 80
40 PRINT "YOUR AGE IS BETWEEN 20 AND 50"
50 GOTO 90
60 PRINT "YOU ARE OLDER THAN 50"
70 GOTO 90
80 PRINT "YOU ARE YOUNGER THAN 20"
90 END
RUN
>>20 anus x = putStrLn $ (!!) ["you are younger than 20", "your age is between 20 and 50", "you are older than 50"] $ length $ flip takeWhile [20,50] (<x) is as far as I can go.