A résolu


Laws of motion 6

plus de 3 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

plus de 3 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

plus de 3 ans il y a

A résolu


Convert a given Character to its decimal equivalent value
Convert a given character to its decimal equivalent value according to the ascii table. if x = '!'; y = 33; if x = 'u'; ...

plus de 3 ans il y a

A résolu


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

plus de 3 ans il y a

A résolu


Monty Python and the Holy Grail: Crossing the Bridge of Death
To cross the Bridge of Death, your function must return the numerical value for the airspeed velocity of an unladen swallow

plus de 3 ans il y a

A résolu


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

plus de 3 ans il y a

A résolu


Square root of number
Square root of given number.

plus de 3 ans il y a

A résolu


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

plus de 3 ans il y a

A résolu


Product of elements in row
Product of matrix such that a=[3 3 1] b=9

plus de 3 ans il y a

A résolu


Weighted average
Given two lists of numbers, determine the weighted average as follows Example [1 2 3] and [10 15 20] should result in 33.3...

plus de 3 ans 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 de 3 ans il y a

A résolu


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

plus de 3 ans il y a

A résolu


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

plus de 3 ans il y a

A résolu


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

plus de 3 ans il y a

A résolu


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

plus de 3 ans il y a

A résolu


Product of Array
Given an array of numbers. Get the product of the array.

plus de 3 ans il y a

A résolu


Temperature Conversion 2

plus de 3 ans il y a

A résolu


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

plus de 3 ans il y a

A résolu


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

plus de 3 ans il y a

A résolu


Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...

plus de 3 ans il y a

A résolu


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

plus de 3 ans il y a

A résolu


Square root of a number
Write a code that will output the square root of x.

plus de 3 ans il y a

A résolu


Convert degrees to radians
Given input in degrees, output to radians

plus de 3 ans il y a

A résolu


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

plus de 3 ans il y a

A résolu


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

plus de 3 ans il y a

A résolu


Will there be a new leader?
Simply answer the title.

plus de 3 ans il y a

A résolu


Tabuada
Dado um inteiro N, retorne um vetor contendo a tabuada de N de 1 a 10; ex: Tabuada(5) = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50...

plus de 3 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 number of...

plus de 3 ans il y a

A résolu


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

plus de 3 ans il y a

Charger plus