Runtime Error(NZEC)

why i m getting Runtime Error(NZEC) in my program??
this program is running successfully with my compiler.


int main(void)
   long int n,k,i,temp=0;

   scanf("%ld %ld",&n,&k);


            if (i%k==0)

    return 0;

plz help me to find the problem…

The program is running successfully ,

see this ideone link

don’t keep space inside format specifiers of scanf. remove space.

No, it’s not, but it’s not your fault, how can one understand this from code?

Please read this, to ask better next time :wink:

yaa agree :slight_smile:

Maybe it’s not valid input, but how should I know, right?

yaa you cannot guess unless you know the problem’s input format .