Write a program to find the sum of 100 natural numbers.in qb64
Answers
Answered by
0
WAP for find sum of natural numbers from 1 to 100
(If you wanna raise the quantity then type the quantity in 1 to 100 space)
DECLARE SUB SERIES ( )
CLS
CALL SERIES
END
SUB SERIES
FOR I = 1 TO 100
S = S + I
NEXT I
PRINT “SUM OF ALL NATURAL NUMBERS FROM 1 TO 100=”; S
END SUB
Similar questions