conio.h is not a standard library, so,
you can’t use the functions getch() and clrscr() in the code.
We use getch() in console programs to prevent screen exit,so we can see the output.
We use clrcsr() for clearing the screen.
Now, both these functions are not needed in online judge environment, so, remove them.
Instead of using **exit(0);** just use **return 0;**
Besides, the header file of exit function is missing- < stdlib.h >
To sum up, the corrections to be made are:
I suggest to use return 0; instead of exit(0);
Also there is no need for \n in scanf("\n%d",&x);, use it as scanf("%d",&x);
I hope that all this should help, if still there is any problem, comment below