INPUT STATEMENT is use when you don't know the value , which should be input, like you have to make a BIO-DATA for 32 Students you don't make different Program, you can just make a program with INPUT statement ,
FOR EXAMPLE
ENTER YOUR NAME? SHAHZAIBBAIG
ENTER YOUR FATHER NAME? NAIR
ENTER YOUR CLASS? 9TH
ENTER YOUR AGE? 15
When You Enter the Name ,Father name, class and age
the result will be
NAME:SHAHZAIBBAIG
FATHER NAME:NASIR
CLASS:9TH
AGE :15
every time you run , this message will appear every time, if you don't use PRINT statement the result will not shown, so PRINT is an important , always remember that String[Alphanumeric] DATA will written with Quotation mark and Numeric data without Quotation Mark,
FOR EXAMPLE
10 CLSWhen You run this , The Screen show you
20 INPUT "ENTER YOUR NAME";N$
30 INPUT "ENTER YOUR FATHER NAME ";F$
40 INPUT "ENTER YOUR CLASS";C$
50 INPUT "ENTER YOUR AGE";A
60 CLS
70 PRINT "NAME:";N$
80 PRINT "FATHER NAME:";F$
90 PRINT "CLASS:";C$
100 PRINT "AGE";A
110 END
ENTER YOUR NAME? SHAHZAIBBAIG
ENTER YOUR FATHER NAME? NAIR
ENTER YOUR CLASS? 9TH
ENTER YOUR AGE? 15
When You Enter the Name ,Father name, class and age
the result will be
NAME:SHAHZAIBBAIG
FATHER NAME:NASIR
CLASS:9TH
AGE :15
every time you run , this message will appear every time, if you don't use PRINT statement the result will not shown, so PRINT is an important , always remember that String[Alphanumeric] DATA will written with Quotation mark and Numeric data without Quotation Mark,
0 comments:
Post a Comment