A résolu


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

10 jours il y a

A résolu


Number Puzzle - 113
Give an example of a six-digit prime number abcdef for which bcde and cd are also prime numbers.

25 jours il y a

A résolu


Number Puzzles - 007

25 jours il y a

A résolu


Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

25 jours il y a

A résolu


Perfect shuffle
We call "perfect shuffle" the process of cutting a deck of cards into two equal halves, and then perfectly interleaving them: on...

26 jours il y a

A résolu


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

26 jours il y a

A résolu


square root
Find square root of given number

26 jours il y a

A résolu


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

26 jours il y a

A résolu


cube of number
find cube of number

26 jours il y a

A résolu


Highest building

27 jours il y a

A résolu


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

27 jours il y a

A résolu


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

27 jours il y a

A résolu


Calculate feeling temperature before climbing a mountain
I sometimes climb a mountain. As is well known, when the altitude becomes 100 (m) higher, the temperature lowers by 0.6 degrees...

27 jours il y a

A résolu


"Find out the best cricket"
This is how I originally read Problem 2013, so let's just go with it. Give me the first and last name of the best cricket, rega...

27 jours il y a

A résolu


Fuel-Air Equivalence Ratio (Lambda)
Lambda (λ) is the ratio of actual air-fuel ratio to the stoichiometric air-fuel ratio. λ = 1 is perfect stoichiometry, λ < 1...

27 jours il y a

A résolu


Calculate the Compression of a Spring
A mechanical engineer wants to determine how much a spring will compress when a force is applied to it. According to Hooke’s Law...

27 jours il y a

A résolu


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

28 jours il y a

A résolu


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

28 jours il y a

A résolu


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

28 jours il y a

A résolu


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

28 jours il y a

A résolu


Covering a four-pointed star polygon by rectangles
Given the area, A, of a star polygon formed by the rectangle, with dimensions L×2L, and four triangles, with height h from their...

28 jours il y a

A résolu


Covering a four-pointed star polygon by circles
Given the area, A, of a star polygon formed by the rectangle, with dimensions L×2L, and four triangles, with height h from their...

28 jours il y a

A résolu


Slicing a 4-pointed star polygon
Given the area, A, of a 4-pointed star polygon formed by the rectangle, with dimensions L×2L, and four triangles, with height h ...

28 jours il y a

A résolu


Covering a 4-pointed star polygon by a circle sector
Given the area, A, of a 4-pointed star polygon formed by the rectangle, with dimensions L×2L, and four triangles, with height h ...

29 jours il y a

A résolu


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

29 jours il y a

A résolu


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

29 jours il y a

A résolu


Square a Number
Given an input x, return y, which is equal to the square of x.

29 jours il y a

A résolu


Find the sum of n squares
What is the sum of the squares of the first n integers?

29 jours il y a

A résolu


Remove the Zero
Given an array n, remove all zeros

29 jours il y a

A résolu


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

29 jours il y a

Charger plus