answersLogoWhite

0

Upon adding the even and odd numbers from 1 to 20, you should arrive at the sum of 210.

=====

...QBASIC program...

sumTotal% = 0

CLS

PRINT "PROGRAM: Add numbers 1 to 20"

PRINT

PRINT "Number", "Total"

PRINT

FOR eachLoopNo% = 1 TO 20

PRINT eachLoopNo%,

sumTotal% = sumTotal% + eachLoopNo%

PRINT sumTotal%

NEXT

PRINT "Sum total ="; sumTotal%

...Output...

PROGRAM: Add numbers 1 to 20

Number Total

1 1

2 3

3 6

4 10

5 15

6 21

7 28

8 36

9 45

10 55

11 66

12 78

13 91

14 105

15 120

16 136

17 153

18 171

19 190

20 210

Sum total = 210

Press any key to continue...

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
RossRoss
Every question is just a happy little opportunity.
Chat with Ross
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach

Add your answer:

Earn +20 pts
Q: When you add the even and odd numbers from 1 to 20?
Write your answer...
Submit
Still have questions?
magnify glass
imp