Global variable in QBASIC

Global variables are the variables which are declared outside all procedures and main program. They are available to all the blocks and…