Computer Science, asked by Affanp, 1 month ago

write a program in Q Basic to display the first 10 terms of the following 10, 16, 22. only correct answer or reported​

Answers

Answered by anindyaadhikari13
1

Required Answer:-

Question:

  • Write a program in QBASIC to display the first ten terms of the series : 10,16,22,....

Solution:

CLS

LET A=10

FOR I = 1 TO 10 STEP 1

PRINT A;

A=A+6

NEXT I

END

Explanation:

  • The given series are in A.P. Difference between each term is 6. So, I have created a variable named 'A' whose initial value is 10. After each iteration, the value of 'A' is displayed on the screen with a space and it's value is incremented by 6.

See the attachment for output.

Attachments:
Similar questions