I might suggest another readln() at the end of program that asks "Test again? (y/n): ", and read it in char variable. Then use that in repeat-until that goes from beginning to end.

You are right about that if you have readln(dayNo,monthNo,yearNo); it cannot be used for reading "x". It would have to be readln(stringVar) and then 3 numbers or the "x" parsed from it. But that goes harder than your example needs.

ps. Third thread about same topic?