print name 10 times in qbasic
Answers
Answered by
1
Solution:
The given problem is solved in QBASIC.
CLS
FOR I = 1 TO 10
PRINT "My name is ABCD"
NEXT I
END
Explanation:
- Line 1: Clears the screen.
- Line 2: A loop is created that iterates 10 times.
- Line 3: Inside the loop, the print statement is written so as to display the name ten times. Looping approach is used to avoid repetition of lines and wastage of time.
- Line 4: End of loop.
- Line 5: End of program.
Refer to the attachment for output.
Attachments:
Similar questions
Biology,
9 days ago
English,
18 days ago
India Languages,
9 months ago
English,
9 months ago
Math,
9 months ago