write a program in q-basic to print all the even numbers from 1 to 100 in loop statement
Answers
Answered by
3
Answer:
This is the required QBASIC program for the question.
CLS
FOR I = 2 TO 100 STEP 2
PRINT I;
NEXT I
END
Algorithm:
- START.
- Iterate a loop for I = 2 to 100. Step value = 2 as difference between two consecutive even number is 2.
- Display the value of I.
- STOP.
Refer to the attachment.
•••♪
Attachments:
Similar questions