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.
How to track the end of stream of numbers ?
yes infinite loop used.
Okay, I don't understand why people are using arrays and stuff for this very, very simply question. Here is all you have to do (I'm explaining the entire algorithm, so don't read ahead if you want to arrive at the answer yourself).
the sample input values dont stop taking input after encountering 42 so we need to ask user how many numbers he want to enter ????/
how should I store the input so that I will compare it with 42,as we can't use array?
how to take input ??help me out
Do I also have to submit my data.in and data.out files? because it tells me "Time limit exceeded".
how to give input?
Is the input given at once or do we give the input one by one
|Cluster:||Cube (Intel G860)|
|Resource:||Douglas Adams, The Hitchhiker's Guide to the Galaxy|