Step 6

Step through this program and see what it does.

The line
b = b + a
means get the old value of b, add in a, and save this as the new value of b.
In other words, it increases b by a
Why does it output 10?

Program 6-1

Change line 2 to
b = 1
and line to
b = b * a
What do you think this will do?

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