I wrote the following program for the problem “TEST” , then I submitted it in BASH language… it gave a runtime error, but it works perfectly on my system … can anyone help me figure out what’s the problem??
touch x.c
printf ‘%s’ ’
#include <stdio.h>
int main(){
int n;
scanf("%d",&n);
while(n!=42){
printf("%d\n",n);
scanf("%d",&n);
}
return 0;
}
’ > x.c
gcc x.c
./a.out