A résolu


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

plus d'un an il y a

A résolu


raise 1/3
Raise a number to 1/3 power.

plus d'un an il y a

A résolu


Bag of apples
find probabilty of getting red apples from a bag of 'r' red and 'g' green apples.

plus d'un an il y a

A résolu


A times B
A times B

plus d'un an il y a

A résolu


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = 2...

plus d'un an il y a

A résolu


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

plus d'un an il y a

A résolu


ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.

plus d'un an il y a

A résolu


Corresponding ASCII code.
Given the number, the output will show the corresponding ASCII code.

plus d'un an il y a

A résolu


ASCII Code
Using matlab, give the symbol that is associated with ASCii code 90.

plus d'un an il y a

A résolu


Interior angles
Find the sum of interior angles for polygon of x sides.

plus d'un an il y a

A résolu


prime test 2
enter the only non prime,non composite number

plus d'un an il y a

A résolu


prime test
find largest 2 digit prime number

plus d'un an il y a

A résolu


Times 10
Try out this test problem first. Given the variable x as your input, multiply it by ten and put the result in y. Examples:...

plus d'un an il y a

A résolu


Times 5
Try out this test problem first. Given the variable x as your input, multiply it by five and put the result in y. Examples...

plus d'un an il y a

A résolu


Swap rows

plus d'un an il y a

A résolu


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

plus d'un an il y a

A résolu


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

plus d'un an il y a

A résolu


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

plus d'un an il y a

A résolu


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 = 9 + 16 ...

plus d'un an il y a

A résolu


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x2, y...

plus d'un an il y a

A résolu


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

plus d'un an il y a

A résolu


Find Logic 9
Guess the Logic! logic(1) = 4 logic(2) = 1 logic(3) = 10 logic(4) = 2

plus d'un an il y a

A résolu


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

plus d'un an il y a

A résolu


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

plus d'un an il y a

A résolu


Find Logic 14
Guess the Logic! logic(1) = 100 logic(2) = 96 logic(3) = 105 logic(4) = 89 logic(5) = 114 Make a function logic(x) which w...

plus d'un an 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 d'un an il y a

A résolu


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

plus d'un an il y a

A résolu


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

plus d'un an il y a

Charger plus