More dwarves?

You have some Snow Whites and some dwarves. Each Snow White needs seven dwarves, but you might have more or dwarves than you need. Write a program to figure out how many dwarves to add, or get rid of.

Use IPO, with at least one Sub for each step (I, P, and O). Use more Subs if you want.

It starts like this:

Start

Make sure that the two input values are numeric, and zero or more. Show errors in the worksheet:

Errors

Make sure that the errors and output from one run are cleared when the next run starts.

Here are output samples. Note that singular/plural is handled correctly.

Output

Output

Output

Output

Output

Upload your workbook.

Hint:

dwarvesNeeded = snowWhites * 7
dwarvesChange = dwarvesNeeded - dwarves

(If you were logged in as a student, you could submit an exercise solution, and get some feedback.)

Referenced in: