Sunday, September 22, 2019

Write a Qbasic program to display the number series ......


Write a Qbasic program to display the number series
1
2 6
3 7 10
4 8 11 13
5 9 12 14 15

CLS
FOR I = 1 TO 5
D = 4
A = I
FOR J = 1 TO I
PRINT A;
A = A + D
D = D - 1
NEXT J
PRINT
NEXT I
END





No comments:

Post a Comment