Write a Qbasic program to display the sum of first 10 even numbers
Answers
Answered by
0
Answer:
CLS. FOR I = 1 TO 10. INPUT "ENTER THE NUMBERS"; N(I) IF N(I) MOD 2 = 0 THEN S = S + N(I) ...
USING SUB PROCEDURE. DECLARE SUB SUM (N( )) CLS. FOR I = 1 TO 10. ...
SUB SUM (N()) FOR I = 1 TO 10. IF N(I) MOD 2 = 0 THEN S = S + N(I) NEXT I. ...
USING FUNCTION PROCEDURE. DECLARE FUNCTION SUM (N( )) CLS. FOR I = 1 TO 10.
Similar questions