Saturday, February 16, 2019

Wap to display 1, 31,. 531, 7531, 97531

Wap to display
1
3 1
5 3 1
7 5 3 1
9 7 5 3 1

CLS
FOR i = 1 TO 5
    c = 2 * i - 1
    FOR j = 1 TO i
        PRINT c;
        c = c - 2
    NEXT
    PRINT
NEXT

END

1 comment: