Go To Index
Computer Studies
Practical
Class IX (Arts /General /Humanities Group)
Practical No. 1(b): Write a program to PRINT your name ten times by using IF......THEN statement.PROGRAM:
10 CLS
20 Input "Enter your Name",N$
30 Let A = 0
40 Let A = A + 1
50 Print "Name",N$
60 If A=10 then END
70 Goto 40
RUN
OR
10 REM PRINT YOUR NAME TEN TIME BY USING IF..... THEN STATEMENT
20 CLS
30 INPUT "ENTER YOUR NAME:";N$
40 PRINT TAB(10) N$
50 LET A = A + 1
60 IF A = 10 THEN GOTO 70 ELSE GOTO 40
70 END
RUN
OUTPUT
GW-BASIC
GW-BASIC
GW-BASIC
GW-BASIC
GW-BASIC
GW-BASIC
GW-BASIC
GW-BASIC
GW-BASIC
GW-BASIC
No comments:
Post a Comment