UVa 697 - Jack and Jill

697 - Jack and Jill

 * [ ]

Summary
To calculate total time needed to complete a task.

Explanation
Simple math and physics calculation problem. But may become hard to get accepted. Follow the question carefully and make the formulae. Following formulae will be helpful

Volume of cylinder = $$pi \times radius^2 \times height$$

Acceleration = $$distance / time^2$$

Note the units of the variables. Check the stopping condition for input as well as for the loop inside your program very carefully. Try to control the loop with an integer. Print a blank line between cases. Reserve 8 spaces before decimal point.

Input
20.0 36.0 72.0 2.0 10.0 18.0 10.0 25.0 72.0 200.0 1.5 8.0 30.0 20.0 0.0

Output
Scenario 1: up hill             20.00 sec well diameter       36.00 in     water level          72.00 in     bucket volume         2.00 cu ft     bucket ascent rate   10.00 in/sec down hill           18.00 sec required volume     10.00 cu ft     TIME REQUIRED       232.59 sec

Scenario 2: up hill             25.00 sec well diameter       72.00 in     water level         200.00 in     bucket volume         1.50 cu ft     bucket ascent rate    8.00 in/sec down hill           30.00 sec required volume     20.00 cu ft     TIME REQUIRED      1141.63 sec