write the Qbasic program to add two numbers (X= 5,Y=15)and display their sum
Answers
Answered by
2
Answer:
Qbasic Program to find the sum of even numbers between 10 and 50
Using WHILE……….. WEND loop
CLS
LET N=12
LET SUM=0
WHILE N<50
SUM= SUM + N
N=N+2
WEND
PRINT “ The sum between 10and 20 is “; SUM
END
The above program will add 12, 14, ……,48 (No. between 10 and 50)
Using FOR……….NEXT loop
CLS
LET SUM=0
FOR I= 12 TO 48 STEP 2
SUM=SUM+I
NEXT I
PRINT “ The sum between 10 and 50 is “; SUM
END
Explanation:
please mark me as brainlist
Similar questions
Accountancy,
8 days ago
Hindi,
8 days ago
English,
17 days ago
Political Science,
17 days ago
Social Sciences,
9 months ago
Physics,
9 months ago
English,
9 months ago