Question
Exercise: More dwarves? You have some Snow Whites and some dwarves. Each Snow White needs seven dwarves, but you might have more or dwarves than
Exercise: 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:
Make sure that the two input values are numeric, and zero or more. Show errors in the worksheet:
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.
Upload your workbook.
Hint:
dwarvesNeeded = snowWhites * 7 dwarvesChange = dwarvesNeeded - dwarves4 1 Snow Whites: 2 Dwarves: Run 10 11 12 Sheet1/ Sheet2 Sheet3 |-23456789-111 4 1 Snow Whites: 2 Dwarves: Run 10 11 12 Sheet1/ Sheet2 Sheet3 |-23456789-111
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started