Solution to the problem number TEST of Spoj - TEST.

Any questions do not hesitate to contact.

#include <bits/stdc++.h>
using namespace std;
int main()
{
    string numero;
    getline(cin,numero);
    while(atoi(numero.c_str())!=42)
    {
        cout<<numero<<"\n";
        getline(cin,numero);
    }
    return 0;
} 

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!