Ok i've manged to find a solution but when i submit it i got wrong answer even though it's doing what it's supposed to do
#include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
int x;
do
{
scanf ("%d", &x);
printf (" %d \n", x);
}
while (x != 42);
return 0;
}
so what i'm doing wrong?