Computer Science, asked by sunitadas270279, 5 months ago


write a program in QBASIC and draw a flow chart to print the following series. 0,7,15,.....N terms ( N should be taken input from user).​

Answers

Answered by dreamrob
0

Program:

Dim n As Integer

Dim i As Integer

Dim x As Integer

Dim y As Integer

Cls

Input "Enter number of terms in a series : ", n

x = 0

y = 7

Print x

For i = 1 To n - 1

   x = x + y

   y = y + 1

   Print x

Next i

End

Output:

Enter number of terms in a series : 10

0

7

15

24

34

45

57

70

84

99

Attachments:
Similar questions