A résolu


Times 32
X is given as your variable. Y is your output multiplied by 32 Example x=1 y=1x32=32

environ 11 ans il y a

A résolu


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

environ 11 ans il y a

A résolu


sum of the first 10 odd numbers
y = sum(first_10_odd_numbers)

environ 11 ans il y a

A résolu


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

environ 11 ans il y a

A résolu


Best Problem Elections
When I am writing those words, there are 2002 problems on Cody. Many of them are simply wonderful. Do you remember which of them...

environ 11 ans il y a

A résolu


Sum Even Numbers
Given a number x, make the summation of all the even until x. For instance, x = 7, so y = 2+4+6 = 12 * x = [3] * y = 2 * ...

environ 11 ans il y a

A résolu


times 5
Given the variable x as your input, multiply it by five and put the result in y.

environ 11 ans il y a

A résolu


Array of Ones
Create a 100 X 100 array of ones.

environ 11 ans il y a

A résolu


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

environ 11 ans il y a

A résolu


Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements. Input should be element's position and output shou...

environ 11 ans il y a

A résolu


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

environ 11 ans il y a

A résolu


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

environ 11 ans il y a

A résolu


Fermat's last theorem - again
For a given integer n, express it as a sum of two squares if possible. Return empty matrix otherwise. Solution may not be unique...

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

environ 11 ans il y a

A résolu


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

environ 11 ans il y a

A résolu


Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...

environ 11 ans il y a

A résolu


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

environ 11 ans il y a

A résolu


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

environ 11 ans il y a

A résolu


Best Square-Shaped Grid for Subplot
If you have x number of plots, find the optimum 'm' number of rows and 'n' number of columns for subplotting where the overall f...

environ 11 ans il y a

A résolu


Integer to boolean
Write a general function that will create the following conversation; Input is a column vector with integers Output is a b...

environ 11 ans il y a

A résolu


Determine the length of a string of characters
Determine the length of a string of characters

environ 11 ans il y a

A résolu


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

environ 11 ans il y a

A résolu


Find difference of two set as per example
Find difference of two set as per example Say x=[1:5] and y=[2:6] then, set_diff(x,y) should give output[1] and set_diff(y...

environ 11 ans il y a

A résolu


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

environ 11 ans il y a

A résolu


imaginary results
Return the value of the imaginary number i to the power of input argument n.

environ 11 ans il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

environ 11 ans il y a

A résolu


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

environ 11 ans il y a

A résolu


Pandigital number n°1 (Inspired by Project Euler 32)
A little warm-up to begin... An n-digit number is pandigital if it makes use of all the digits 1 to n exactly ONCE. For ex...

environ 11 ans il y a

A résolu


GJam 2011 Africa Qual A: Maximum Loop Size
This Challenge is derived from <http://code.google.com/codejam/contest/837485/dashboard GJam 2011 Africa: Closing the Loop>. Sma...

environ 11 ans il y a

Charger plus