Risolto


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If p is the perimeter of a right angle triangle with integral length sides, { a, b, c }, there are exactly three solutions for p...

circa un mese fa

Risolto


Problem Set 2
Make a calculator by the four main operators (op): + - * / And the two numbers (n1, n2). Don't forget to check to divisio...

circa un mese fa

Risolto


Problem Set 1
You will get the vector "v", you should put it's length in a variable called "lngth", then... If it's length from 1 to 5, sz = ...

circa un mese fa

Risolto


Switch-Case-Otherwise
You should make random numbers to 10, by 3 rows and 3 columns. Cases from 1 to 3, b = true. Otherwise, b = false.

circa un mese fa

Risolto


NOT
If a not equal to zero, b = true, else, b = false.

circa un mese fa

Risolto


OR
If a greater than zero or c less than 10, b = true, else, b = false.

circa un mese fa

Risolto


AND
If a greater than 0 and n less than 10, b = true, else, b = false. (Checking a should be in one line by AND special sign in MAT...

circa un mese fa

Risolto


Nested If(s)
If a greater than zero, then check, if a = greater that 1 and less than 10, then b = true, else, b = false.

circa un mese fa

Risolto


If-Elseif-Else
If a more than zero, b = true, if a = zero , b = zero, else, b = false.

circa un mese fa

Risolto


If-Else
If a more than zero, b = true, else, b = false.

circa un mese fa

Risolto


If
If a more than zero, then b = true.

circa un mese fa

Risolto


Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the shorter leg.
Further to the problem 43236, find the length of shorter leg P.S No built-in functions allowed

circa un mese fa

Risolto


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

oltre un anno fa

Risolto


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

oltre un anno fa

Risolto


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

oltre un anno fa

Risolto


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

oltre un anno fa

Risolto


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

oltre un anno fa

Risolto


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

oltre un anno fa

Risolto


sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

oltre un anno fa

Risolto


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

oltre un anno fa

Risolto


Spherical Volume
Calculate the volume of a sphere.

oltre un anno fa

Risolto


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.

oltre un anno fa

Risolto


area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

oltre un anno fa

Risolto


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

oltre un anno fa

Risolto


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

oltre un anno fa

Risolto


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

oltre un anno fa

Risolto


Remove the Zero
Given an array n, remove all zeros

oltre un anno fa

Risolto


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

oltre un anno fa

Risolto


union without repitition
Let a = [9 9 9 9 9 9 8 8 8 8 7 7 7 6 6 6 5 5 4 2 1] b = [1 1 1 3 3 3 3 3 4 4 4 4 4 10 10 10] Output should be [9 8...

oltre un anno fa

Risolto


reverse string
input='rama' output='amar'

oltre un anno fa

Carica altro