개발자 뺚
[Cody] 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.
function SA = func_frosting(r,h)
SA = pi * r ^ 2 + 2 * pi * r * h;
end
'Solution > MATLAB' 카테고리의 다른 글
[Cody] Problem 44944. Convert from Fahrenheit to Celsius (0) | 2023.08.23 |
---|---|
[Cody] Problem 128. Sorted highest to lowest? (0) | 2023.08.22 |
[Cody] Problem 106. Weighted average (0) | 2023.08.22 |
[Cody] Problem 2447. Musical Note Interval 1 - Diatonic Scale (21) | 2023.08.22 |
[Cody] Problem 1. Times 2 - START HERE (21) | 2023.08.22 |