Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return true if the triangle with sides a, b and c is right-...
約2ヶ月 前
解決済み
Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...
約2ヶ月 前
解決済み
Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.
約2ヶ月 前
解決済み
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 ...
約2ヶ月 前
解決済み
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false.
Example...
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
約2ヶ月 前
解決済み
MATLAB Basic: rounding II
Do rounding nearest integer.
Example: -8.8, answer -9
+8.1 answer 8
+8.50 answer 9
約2ヶ月 前
解決済み
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...
約2ヶ月 前
解決済み
Square the input
Given a scalar or vector x, return the square of each element.
Example
x = [7 2]
answer = [49 4]
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:
...
約2ヶ月 前
解決済み
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B.
So if
A = [1 2 3;
4 5 6];
...
約2ヶ月 前
解決済み
Check if number exists in vector
Return 1 if number a exists in vector b otherwise return 0.
a = 3;
b = [1,2,4];
Returns 0.
a = 3;
b = [1,2,3];
Returns 1.
約2ヶ月 前
解決済み
Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.