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 n...
約1ヶ月 前
解決済み
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displayed ...
約1ヶ月 前
解決済み
Calculate BMI
Given a matrix hw (height and weight) with two columns, calculate BMI using these formulas:
1 kilogram = 2.2 pounds
1 inch = 2...
約1ヶ月 前
解決済み
Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.
約1ヶ月 前
解決済み
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
約1ヶ月 前
解決済み
What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...
約1ヶ月 前
解決済み
Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not.
Example:
1:7 -> 0
[7 5 2] -> 1
約1ヶ月 前
解決済み
Sum of diagonal of a square matrix
If
x = [1 2 4; 3 4 5; 5 6 7]
then y should be the sum of the diagonals of the matrix
y = 1 + 4 + 7 = 12
約1ヶ月 前
解決済み
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...