Solved

Times 3 problem
When you enter the number, it should return the number multiplied by 3

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

etwa ein Jahr ago

Solved

Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

etwa ein Jahr ago

Solved

Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

etwa ein Jahr ago

Solved

Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

etwa ein Jahr ago

Solved

Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

etwa ein Jahr ago

Solved

Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

etwa ein Jahr ago

Solved

Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

etwa ein Jahr ago

Solved

Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

etwa ein Jahr ago

Solved

Given input in radians, output to degrees

etwa ein Jahr ago

Solved

Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

etwa ein Jahr ago

Solved

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.

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

square number
Square a number

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago

Solved

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

etwa ein Jahr ago