A résolu


y equals x divided by 2
function y = x/2

plus d'un an il y a

A résolu


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...

plus d'un an il y a

A résolu


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

plus d'un an il y a

A résolu


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

plus d'un an il y a

A résolu


Ordered pairs of integers (I, J).
Write a MATLAB function that calculates the number of ordered pairs of integers (I, J) that can be formed satisfying the conditi...

plus d'un an il y a

A résolu


Sum all integers from 1 to 2^x
Given a number x, your function must return the summation of all integers from 1 to 2^x.

plus d'un an il y a

A résolu


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

plus d'un an il y a

A résolu


Sum Sum Sum!
Calculate the sum of the natural numbers from 1 to n

plus d'un an il y a

A résolu


Sum of cubes
Write a program to determine sum of cubes of first n odd numbers.

plus d'un an il y a

A résolu


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

plus d'un an il y a

A résolu


Finding sum of even numbers in a vector.
Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

plus d'un an il y a

A résolu


Sum of first n positive integers
Given n, find the sum of first n positive integers Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these terms is 55

plus d'un an il y a

A résolu


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

plus d'un an il y a

A résolu


Row sum

plus d'un an il y a

A résolu


Find sum of negative elements in row.
Find sum of negative elements in row. Example x=[1 -5 3 4 -6 6 7 8 9 10] result = -11

plus d'un an il y a

A résolu


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

plus d'un an il y a

A résolu


Sum of self power series
The series, 1^1,2^2,3^3,4^4,.... Find the sum of such series when x terms are given.

plus d'un an il y a

A résolu


Find the remainder - 02
Given an array of integers, find the remainder when the summation of all the elements is divided by N

plus d'un an il y a

A résolu


Sum sum!!!
Sum the numbers from 1 to n

plus d'un an il y a

A résolu


Summy's even sum

plus d'un an il y a

A résolu


Find Sum of array

plus d'un an il y a

A résolu


Summy's odd sum

plus d'un an il y a

A résolu


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

plus d'un an il y a

A résolu


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

plus d'un an il y a

A résolu


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

plus d'un an il y a

A résolu


Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

plus d'un an il y a

A résolu


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

plus d'un an il y a

A résolu


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

plus d'un an il y a

A résolu


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: http://e...

plus d'un an il y a

A résolu


Find the Pattern 10

plus d'un an il y a

Charger plus