1. REM ask name, address & class and display them
The following QBasic code is used to print the required problem
CLS
INPUT "Type your name "; name$
INPUT "Type your address "; address$
INPUT "Type your phone "; phone
PRINT "Your name is "; name$
PRINT "You live in "; address$
PRINT "You study in class "; phone
END
In the above,
3 input statement is used to enter the data from the keyboard in the variable name$, address$ and phone.
3 the print statement is used to print the variable name$, address$ and phone
No comments:
Post a Comment