In this way, GOTO statement will execute.Ī) To Accept the name from user, and print "HELLO" with name, if the name is RAMANī) To Accept name and nationality of the person and print welcome, if he is INDIAN.Ĭ) To Accept two numbers and print the greater one.ĭ) To Ask the user to enter any number, and print it is even or odd.Į) To Ask the user to enter two numbers, and divide the greater one with smaller. MY MOTHER NAME IS SHAILJA & then line 2 will be called I LIVES IN RAEBARELI & then line 4 will be executed with END. In the above program, line 1 will be executed and then goto will call the label ABC which has code MY FATHER NAME IS RAJESH & will call to line number 3 i.e. PRINT "MY FATHER NAME IS RAJESH " :GOTO 3 The Control of program to the Goto statement then statements of Gotoīlock will be Executed and The Name of Goto Statements block is alsoĢ PRINT " I LIVES IN RAEBARELI " : GOTO 4ģ PRINT " MY MOTHER NAME IS SHAILJA " :GOTO 2 Name must be defined with the help of a Colon. codeFOR i 1 TO 10 PRINT i 2 NEXT i /codeThis works in QB64, which is a modern version of QBasic: QB64 - Wikipedia You can read about FOR. Statement on which Control is transferred. We use goto Statement then we have to supply a name along with a Goto Of the program then we can use the goto statement. Location for example- if you wants to transfer the control to the other place Goto Statement is used for transferring the control to the other We make completing any Qbasic Programs For Class 6 Pdf easier.Control Statements are used for controlling the Execution of the An attachment in an email or through the mail as a hard copy, as an instant download.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |