Community Profile

# Jack Lue

42 2013 年以降の合計貢献数

#### Jack Lue's バッジ

Is my wife right?
Regardless of input, output the string 'yes'.

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

5年以上 前

Max of a Vector
Write a function to return the max of a vector

5年以上 前

Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

5年以上 前

Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

5年以上 前

Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

5年以上 前

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

5年以上 前

Calculate the sum of two numbers. Example input = [2 3] output = 5

5年以上 前

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

5年以上 前

Area of rhombus
Calculate the rhombus area

5年以上 前

Return area of square
Side of square=input=a Area=output=b

5年以上 前

Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

5年以上 前

Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

5年以上 前

Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

5年以上 前

Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

5年以上 前

Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

5年以上 前

Determine the square root
Determine the square root of the value the user has entered, n.

Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

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...

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 righ...

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...

Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

6年以上 前

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

6年以上 前

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

6年以上 前

Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

6年以上 前