Both pause and cls are Windows commands.
OnlineGDB is running on a linux machine, hence the Windows commands do not work there.
"clear" is the equivalent in linux of "cls" in Windows, however, it does not work in here. It works in your own PC though if you're running linux.