Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z.
Examples:
Inputs x = 2, y = 4
Output z is 6
...
3年弱 前
解決済み
Beginner's Problem - Squaring
Try out this test problem first.
Given the variable x as your input, square it by two and put the result in y.
Examples:
...
3年弱 前
解決済み
Area of a Square
Inside a square is a circle with radius r.
What is the area of the square?
3年弱 前
解決済み
Square a Number
Given an input x, return y, which is equal to the square of x.
3年弱 前
解決済み
Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.
3年弱 前
解決済み
multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y.
Examples:
Input x = 2
Output y is ...
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
3年弱 前
解決済み
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x.
<<https://i.imgur.com/jlZDHhq.png>>
Image courtesy of <http://up...
3年弱 前
解決済み
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...
3年弱 前
解決済み
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.]
Non-scored bonus...
3年弱 前
解決済み
Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...
3年弱 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...