run time error..!!

error
runtime

#1

the question the life,universe and earth in which the input should be one or two digit no. and should not be equal to 42.if equal no. should be displayed except 42 and more than 2 digit no.s.
i made this program it is running properly on my laptop while uploading here it is showing run time error.please help me…


#2

Take Input and display output exactly as provided under the problem
Avoid printing any extra characters, newlines or comments


#3

I looked up your latest submission. It would have been easier if you provided it in your question.

In addition to xoticasb’s answer (which is correct and should help you improve your submission), note that the number of entries in the input can be arbitrarily large. There may be more than 100 numbers in the input (the size of the array that you declared).

Try finding a solution that does not need an array to store the numbers that are read…


#4

Read the FAQ, there are several errors in your code:

  • first of all, your main() method has to return int
  • you have to print only what you are asked for, do NOT print strings like "enter the numbers", on the other hand when you print number why are you using `printf( "
    %d

" )instead of simpleprintf("%d
")` ?

  • why are you assuming that the number count < 100?
  • this is not an error, but you do not need to validate input