Little's law: WIP = throughput × cycle time. Given any two of the three values, compute the third.
Read lines until the end of input. Each line has a question type and two numbers:
CT wip throughput→ printCycle time: X daysTP wip cycletime→ printThroughput: X cards/dayWIP throughput cycletime→ printWIP: X cards
Print X with two decimals. If a division by zero would be needed, print Error: division by zero. For an unknown type print Error: unknown query TYPE.
Input:
CT 12 3
TP 10 5
WIP 2 4.5
CT 5 0
XYZ 1 2
Output:
Cycle time: 4.00 days
Throughput: 2.00 cards/day
WIP: 9.00 cards
Error: division by zero
Error: unknown query XYZ