Write a program to print the message "Computer World" 10
times (Using While Wend).
Answers
Answered by
4
Answer:
CLS
I= 1
WHILE I<=10
PRINT "Computer World"
I=I+1
WEND
END
Logic:-
- Initialise I= 1
- Run a while loop with condition I<=10
- print the line "Computer World"
- increase the value of I by 1
- Close the while loop
- Close the program
Answered by
1
Solution:
The given cσde is written in QBASIC.
CLS
I = 1
WHILE I <= 10
PRINT "Computer World"
I = I + 1
WEND
END
Note:
Syntax of While-Wend:
WHILE <Condition>
Statements.
WEND
Here, the while loop iterates 10 times. Inside the loop, the message to be displayed is written. As loop iterates 10 times, the message is displayed 10 times.
See the attachment for output.
Attachments:
Similar questions