Read before you write
See why a value has to exist before anything can use it.
What to do
This program shows a total before it has finished adding to it, so the wrong number comes out.
Move the lines so the output is 30, not 10. Show the total once, at the end.
Your code Read-only reference Pseudocode
Output
Press Run to see what your code does.
Stuck on the idea rather than the typing? The lesson behind this set is Program Structure & Sequence on Learn to Write Code.