Write a program in QBASIC to find the sum of any ten numbers
Answers
Answered by
4
CLS
SUM = 0
FOR I = 1 TO 10
INPUT "ENTER NUMBER: ";N
SUM = SUM+N
NEXT I
PRINT "SUM OF THE NUMBERS = ";SUM
Answered by
0
Answer: please consider marking me as brainliest
Explanation: QBasic Programming
1. CLS. FOR I = 1 TO 10. INPUT "ENTER THE NUMBERS"; N(I) IF N(I) MOD 2 = 0 THEN S = S + N(I) ...
2. USING SUB PROCEDURE. DECLARE SUB SUM (N( )) CLS. FOR I = 1 TO 10. ...
3. SUB SUM (N()) FOR I = 1 TO 10. IF N(I) MOD 2 = 0 THEN S = S + N(I) NEXT I. ...
4. USING FUNCTION PROCEDURE. DECLARE FUNCTION SUM (N( )) CLS. FOR I = 1 TO 10
Similar questions