Step 14

What does this program do?

This program has a loop nested inside another loop.

Program 14-1

Change line 7 to
c = a + b
Work out what it will do - write it down. Then step through it.

Program 14-2

Change this so that it outputs the sequence 1,2,3,4,2,4,6,8

Program 14-3

Change this so that it outputs the sequence 1,2,3,3,6,9,5,10,15

Index

Input:
Output:
Score:
Line
Statement
Var
Now
Next
1
a
 
2
b
 
3
c
 
4
d
 
5
e
 
6
7
8
9
10
11
12
13