TEST: Need help with solution for problem

hello sir, i tried solving the first problem of easy section , but it is displaying run time error. can you please help me rectify?

#include
 #include
 int main(void)
 { 
int c;
 int x=0; 
while(scanf("n%d", &c))
{
 if(c == 42) 
{ x=-1; }
 else 
{ if(x== -1)
{} 
else
 { printf("%d",c); }
 }
 }
 getch();
 return 0; 
}

type you full code…see first 2 lines…!

Please see the answer to your earlier question http://discuss.codechef.com/questions/131/i-am-getting-a-tle-please-help

//