Computer Science, asked by anushkasolanki953, 17 days ago

write the Qbasic program to add two numbers (X= 5,Y=15)and display their sum​

Answers

Answered by pande3279
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