Risolto


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

circa un anno fa

Risolto


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.

circa un anno fa

Risolto


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

circa un anno fa

Risolto


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

circa un anno fa

Risolto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

circa un anno fa

Risolto


find "greatest common divisor" of two integer value
A function to find Greatest Common Divisor of two integer input E.G. x=-18 y=96 output should be +6 x=-18; y=96; >>your...

circa un anno fa

Risolto


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

circa un anno fa

Risolto


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

circa un anno fa

Risolto


Primes numbers which are the difference of two consecutive cubes
Problem statement Given a positive integer n greater than 2, find the prime numbers less or equal to n and which are the diff...

circa un anno fa

Problema


Primes numbers which are the difference of two consecutive cubes
Problem statement Given a positive integer n greater than 2, find the prime numbers less or equal to n and which are the diff...

circa un anno fa | 2 | 31 risolutori

Risolto


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

circa un anno fa

Risolto


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

circa un anno fa

Risolto


Find the first occurence of a given gap between two consecutive prime numbers
Given a gap = p' - p between the two consecutive prime numbers p and p', find its first occurence, f. For examples : If , f=...

circa un anno fa

Problema


Find the first occurence of a given gap between two consecutive prime numbers
Given a gap = p' - p between the two consecutive prime numbers p and p', find its first occurence, f. For examples : If , f=...

circa un anno fa | 2 | 26 risolutori

Risolto


Unique rows
A matrix is given as the input. Remove any duplicate rows from the matrix. keep the first occurrence.

circa un anno fa

Risolto


Create a fibonacci series

circa un anno fa

Risolto


Zero Out Negative Elements
Write a MATLAB function called zeroNegatives that takes a numeric vector v as input and returns a modified version where all neg...

circa un anno fa

Risolto


Subtraction
Given two numbers a and b subtract them

circa un anno fa

Risolto


Mode
Find the mode of a vector x

circa un anno fa

Risolto


x = 3
write a funciton to make the variable x = 3

circa un anno fa

Risolto


x = 1

circa un anno fa

Risolto


Add two numbers
Given two numbers a and b add them together

circa un anno fa

Risolto


Remainder
Given two number a and b find the remainder when you divide a by b

circa un anno fa

Risolto


Prime Number
Determine if a number is prime

circa un anno fa

Risolto


'X'avier
Given a square matrix A of size n, write a function to create a new matrix B where only the elements on the main diagonal and th...

circa un anno fa

Risolto


Surface area of a sphere
Given the radius of a sphere, find it's Surface area

circa un anno fa

Risolto


Surface area of a cone

circa un anno fa

Risolto


PIN code

circa un anno fa

Risolto


Circle : Square

circa un anno fa

Risolto


divide by 5

circa un anno fa

Carica altro