int main(){int x,y;int r;printf("enter first number ");scanf("%d",&x);printf("enter second number");scanf("%d",&y);r=x+y;printf("%d output:",r);system("pause");return 0;}
Which problem do try to solve?It is usually wrong to print texts like "enter first number " since SPOJ tries to process this as part of your code output and classifies it as wrong answer.If you print something, you have to print line breaks as well (in most problems).system("pause"); will cause your code to interrupt or time out, it may be the cause of your error because it is a windows platform command and SPOJ runs on Linux machines.Anyway it is agood idea to test your code at ideone.com and it is possible to post code here in the forum and preserve the fomatting and the include statements.
thank you for replying...
but i use devc++ for programs....
Yes, that's no problem, I use a local environment as well. But still, ideone is a good choice to test your code before submitting it at spoj, because it uses the same environment.