Problem 44276. Simple spirometer - find your lung capacity from the number and size of soap bubbles in one breath

Solution 1248083

Submitted on 8 Aug 2017 by Tim
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
n=125; d=1; assert(spiro(n,d)<25*pi)

2   Pass
n=120; d=1; assert(spiro(n,d)>19*pi)

3   Pass
n=12; d=1; assert(spiro(n,d)<3*pi)

4   Pass
n=11; d=1; assert(spiro(n,d)>pi)