TEST - Life, the Universe, and Everything
Your program is to use the brute-force approach in order to find the Answer to Life, the Universe, and Everything. More precisely... rewrite small numbers from input to output. Stop processing input after reading in the number 42. All numbers at input are integers of one or two digits.
Input: 1 2 88 42 99 Output: 1 2 88
In case of any problems with your code, you can take a look in the forum, you'll find the answer, only for this problem, in various languages.
@spideycoder_6 you sure abt that?
Mało sprecyzowane zadanie...
Never know 42 is the meaning of life.
So, it's a list.Last edit: 2021-04-06 06:35:25
yeah, you right @sachsri. Btw my solution got accepted after ending the input loop once 42 is entered.
I don't understand why my code is not working. It's written in Forth and works correctly in the gForth window on my computer but fails on Spoj.
ok ok i love you all
to solve the question: take infinite while loop. Input n . if n equal 42,break.Then print n.
|Cluster:||Cube (Intel G860)|
|Resource:||Douglas Adams, The Hitchhiker's Guide to the Galaxy|