Write a program in QBASIC to find the sum of the following series
S=5+7+9+11+13+15+17
Answers
Answered by
0
Answer:
and like I have a good time to explore new no longer
Answered by
5
Answer:
Well, it is actually very simple, all you need to do is :
CLS
A = 5
S = 0
INPUT "ENTER A NUMBER"; N
FOR i = 1 TO N
S = S + A
A = A + 2
NEXT i
PRINT "The sum of the numbers in the series is :"; S
END
Here, the value of A will be A + 2, You can adjust it to your needs.
Similar questions