anyway here's my code
open System
let mutable count = 0 //Loop Counter
let mutable hasAnswer = false // has 42 been entered yet?
while count < 5 do
let input = Console.ReadLine()
let intInput = Convert.ToInt32(input)
match intInput with
| _ when hasAnswer = true -> () //Don't Print Anything
| 42 -> hasAnswer <- true //42 is the answer to life
| _ -> Console.WriteLine(intInput.ToString())
count <- count + 1 //increase the loop counter
done //this makes it cleaner to me to those of you who don't like python, the no ending block is what did it for me.

New Topic/Question
Reply



MultiQuote



|