What kind of triangle?
Write a function named check_triangle that receives three positive integers as input: a, b, and c.
These three numbers are inte...
10 mesi fa
Risolto
Cluster Partition
Given an array (row or column) of numbers, divide the array into consecutive positive/negative numbers.
0 is to be treated inde...
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...
10 mesi fa
Risolto
Find the closest e-abundant numbers
An abundant number is an integer whose sum of its positive proper divisors—or the sum of its divisors excluding itself—exceeds ...
10 mesi fa
Risolto
Permuted Multiples: Project Euler Problem 52
Return the smallest positive integer, x, for which x, 2x, 3x, 4x, 5x, and 6x, all contain the same digits but in different order...
10 mesi fa
Risolto
Matrix Diagonal Sum
Given a square matrix A of size n x n, write a function to compute the sum of the elements on both the main diagonal and the ant...
10 mesi fa
Risolto
List e-perfect numbers
A perfect number is an integer that equals the sum of its positive proper divisors—or the sum of its divisors excluding itself. ...
Sum powers of e-divisors
In number theory the function produces the sum of divisors of an integer raised to the power . Setting sums the divisors, as ...
Determine the e-divisors of an integer
From MathWorld: is called an e-divisor (or exponential divisor) of a number with prime factorization
if and
where for...
11 mesi fa
Risolto
Count the e-divisors of an integer
Cody Problem 2664 asks us to count the divisors of an integer, and Cody Problem 60843 involves listing the e-divisors of an inte...
11 mesi fa
Risolto
Test x = 1
Write a function to make the variable x = 1