Pascal (FPC 3.0.4)

program ideone;
var x:byte;
begin
	readln(x);
	while x<>42 do
	begin
		writeln(x);
		readln(x)
	end
end.
Doubtful Deer