I don't know what is going wrong with my following code for the problem Life, the Universe, and Everything.
When i submitted this code in python it is accepted. But when I am submiiting any problem using C++ compiler then it is not getting submitted and browser is loading...
Plz let me know what is wrong??
#include <iostream>
using namespace std;
int main() {
// your code here
int a;
while(1)
{
cin >> a;
if(a==42)
break;
cout << a << endl;
}
return 0;
}