I,m trying to solve TEST - Life, the Universe, and Everything.
Make few codes.
Always “wrong answer”.
All works in my compiler.
#include
#include
#include
using namespace std;
int main()
{
int numb[1000], i, j;
cout << “Input:” << endl;
for (i=0;;++i)
{
cin >> numb[i];
if (numb[i]==42)
break;
j=i+1;
}
cout << endl;
cout << "Otput: " << endl ;
for (i=0;i!=j;++i)
cout << numb[i] << endl;
return(0);
}
what’s wrong with the code