Gelöst


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

etwa 3 Jahre vor

Gelöst


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

etwa 3 Jahre vor

Gelöst


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

etwa 3 Jahre vor

Gelöst


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

etwa 3 Jahre vor

Gelöst


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

etwa 3 Jahre vor

Gelöst


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

etwa 3 Jahre vor

Gelöst


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

etwa 3 Jahre vor

Gelöst


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

etwa 3 Jahre vor

Gelöst


Laws of motion 5

etwa 3 Jahre vor

Gelöst


Laws of motion 4

etwa 3 Jahre vor

Gelöst


Laws of motion 3

etwa 3 Jahre vor

Gelöst


Laws of motion 2

etwa 3 Jahre vor

Gelöst


Laws of motion 1

etwa 3 Jahre vor

Gelöst


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

etwa 3 Jahre vor

Gelöst


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

etwa 3 Jahre vor

Gelöst


Matrix for beginners
Multiply x and y elemwise.

etwa 3 Jahre vor

Gelöst


Matrix Pattern 1

etwa 3 Jahre vor

Gelöst


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

etwa 3 Jahre vor

Gelöst


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

etwa 3 Jahre vor

Gelöst


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

etwa 3 Jahre vor

Gelöst


radius of a spherical planet
You just measured its surface area, that is the input.

etwa 3 Jahre vor

Gelöst


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

mehr als 3 Jahre vor

Gelöst


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

mehr als 3 Jahre vor

Gelöst


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

mehr als 3 Jahre vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

mehr als 3 Jahre vor

Gelöst


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

mehr als 3 Jahre vor

Gelöst


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Mehr laden