Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
10年弱 前
解決済み
Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...
10年弱 前
解決済み
Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...
Interior angles
Find the sum of interior angles for polygon of x sides.
10年弱 前
解決済み
Writing a nested function: BMI calculation
Write a nested function CalculateBMI that assigns bmiValue given a user's weight and height. Use the following equations to calc...
10年弱 前
解決済み
Smallest and Largest Real Numbers
Complete the function by assigning minReal with the smallest positive double precision floating-point number, and maxReal with t...
prime test 2
enter the only non prime,non composite number
10年弱 前
解決済み
Computing Wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...
Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...
10年弱 前
解決済み
Writing a recursive math function
Complete the recursive function RaiseToPower().
Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...
10年弱 前
解決済み
Prime checker
Complete the recursive function to determine if a number is prime. Skeletal code is provided in the PrimeChecker function.