Basic Program To Print Sum of First 10 Odd Numbers
2May.2018
REM THE NAME IS INCORRCT. PROG GIVES SUM OF FIRST 10 ODD NUMBERS
CLS
SUM = 0
FOR I = 1 TO 10
LET X = 2 * I – 1
SUM = SUM + X
PRINT ” ODD NUMBER AT POSITION”; I; “IS”; X
NEXT I
PRINT “TOTAL SUM”, SUM
END
No Comments