Problem 44943. Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you need to put frosting on (all around the sides and the top).
Return the result in output variable SA.
Solution Stats
Problem Comments
-
16 Comments
Show
13 older comments
Maya Ben Yacov
on 17 Oct 2023
I used the cylinder surface area formula: 2*pi*r(r+h)
am I using the wrong formula?
Christian Schröder
on 18 Oct 2023
@Maya Ben Yacov It's the right formula in principle, but keep in mind that the bottom of the cake does not get frosting.
Miron Krejci
on 5 Mar 2024
Tasty problem
Solution Comments
Show commentsGroup

Randomness
- 11 Problems
- 19 Finishers
- Given n, create n random numbers such that their standard deviation is also n.
- Generating random matrix with given probability mass function
- Roll the Dice!
- Make a random, non-repeating vector.
- Generate a random matrix A of (1,-1)
- Create a random vector of integers with given sum
- Guess the number I'm thinking of (Part 1)
- Fibonacci Decomposition
- Cryptomath: Addition
- Break it up! Break it up!
- Balanced Ternary Numbers: Easy as |, |-, |o
Problem Recent Solvers26107
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!