To print the sum of the even numbers from 10 to 50. (Qbasic Code)

REM To print the sum of the even numbers from 10 to 50. (Qbasic Code)
CLS
LET s = 0
FOR i = 10 TO 50 STEP 2
    LET s = s + i
NEXT i
PRINT "The sum of the numbers is "; s
END

Share :

Twitter
Back To Top

facebook main

counter

Powered by Blogger.