This problem is yummy! :-)
Simple & interesting.
The same as the surface area of a cylinder but without calculating the area of the bottom surface (circle) of the cylinder:
Original: A=2πrh+2πr2
Modified: A=2πrh+πr2
Having finished all 15 problem just to see what is the leading solution looks like. Then I realize smaller size doesn't mean the solution is better, often it is at the price of understand-ability.
Remember, in most cases, you write program for humans not for machines.
SA = ((2*pi*r*h)+(2*pi*(r^2)))-(pi*(r^2));
the ans is 0, because the cake will be eaten.
that's good
thanks
calculating surface area except the base area
easy
I do not think this exercise is correct. As one should not put frosting below the cake, the area of the cake to put frost on is the area of the circle on top of it plus the area of the "bent" rectangle on its sides. Thus:
function SA = func_frosting2(r,h)
ARectangle = pi*r*h;
ACircle = pi*r^2;
SA = ARectangle + ACircle;
I think the current solution is misleading
simple and fun.
just tricky one.
Make an awesome ramp for a tiny motorcycle stuntman
334 Solvers
Flip the main diagonal of a matrix
506 Solvers
Generate a vector like 1,2,2,3,3,3,4,4,4,4
3613 Solvers
Mersenne Primes vs. All Primes
165 Solvers
Spot the First Occurrence of 5
365 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!