Problem Link: CodeChef: Practical coding for everyone
-
I am getting error on this problem, I can’t understand what is wrong.I am using CPP. I have tried testing it locally and output seems fine. Sorry if it’s a really basic question. I tried to solve it on my own but wasn’t able to. Any help appreciated. Thanks
-
This is the code I am using:
#include <iostream>
using namespace std;
int main()
{
int input;
cin >> input;
while (input != 42)
{
cout << input << endl;
cin >> input;
}
return 0;
}