Hello there,
I have no knowledge on Pascal, but, after reading up from here, I noticed the following:
A program in Pascal starts with the reserved word 'Program' (although it is not explicitly required) and ends with 'End', following a full stop (this is required though).
After implementing the above advice, I had compiled it through OnlineGDB once again, and it compiles and runs well.