Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
r = 6/sqrt(pi);
h = 1;
y = coneVolume(r,h)
y_correct = 12;
assert(abs(y-y_correct)<1e-3)
y =
12
y =
12
|
2 | Pass |
r = 4.7;
h = 2.3;
y = coneVolume(r,h)
y_correct = 53.2050;
assert(abs(y-y_correct)<1e-3)
y =
53.2050
y =
53.2050
|
3 | Pass |
r = 1.1;
h = 1.21;
y = coneVolume(r,h)
y_correct = 1.5332;
assert(abs(y-y_correct)<1e-3)
y =
1.5332
y =
1.5332
|
4 | Pass |
r = 10.7;
h = 100;
y = coneVolume(r,h)
y_correct = 11989.36476;
assert(abs(y-y_correct)<1e-3)
y =
1.1989e+04
y =
1.1989e+04
|
5 | Pass |
r = pi^3;
h = exp(1);
y = coneVolume(r,h)
y_correct = 2736.6694;
assert(abs(y-y_correct)<1e-3)
y =
2.7367e+03
y =
2.7367e+03
|
6 | Pass |
r = sqrt(5);
h = sqrt(817);
y = coneVolume(r,h)
y_correct = 149.66135;
assert(abs(y-y_correct)<1e-3)
y =
149.6613
y =
149.6613
|
895 Solvers
480 Solvers
353 Solvers
307 Solvers
144 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!