PRACTICAL NO 1:
OBJECT: Write a program to print
your name ten times by using.
(a) FOR-NEXT Statement
10 REM * PROGRAM TO
PRINT YOUR NAME TEN TIMES *
20 CLS
30 INPUT “ENTER
YOUR NAME ========>”; N$
40 CLS
50 PRINT TAB(25)“PRINTING OF NAME TEN TIMES”
60 PRINT TAB(23)“BY USING FOR-NEXT STATEMENT”
70 PRINT TAB(25)“~~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
80 FOR A = 1 TO 10
90 PRINT TAB(38); A; N$
100 NEXT A
110 END
|
(b) IF-THEN
Statement:
10 REM * PROGRAM TO
PRINT YOUR NAME TEN TIMES *
20 CLS
30 INPUT “ENTER YOUR NAME ========>”; N$
40 CLS
50 PRINT TAB(25)“PRINTING OF NAME TEN TIMES”
60 PRINT TAB(25)“BY USING IF-THEN STATEMENT”
70 PRINT TAB(25)“~~~~~~~~~~~~~~~~~~~~~~~~~~~~”
80 A = A + 1
90 PRINT TAB(38); A; N$
100 IF A = 10 THEN
END ELSE 80
|
0 comments:
Post a Comment