using namespace std;
int main()
{
int a;
cin >> a;
while (a != 42)
{
cout << a;
cin >> a;
}
return 0;
}
using namespace std;
int main()
{
int a;
cin >> a;
while (a != 42)
{
cout << a;
cin >> a;
}
return 0;
}
each output should be in next line. use cout<<a<<endl;