Gelöst


Creating a code via test suite :)
Given the test suites, create a code that would fit them :) *Clue: Pascal's Triangle

fast 7 Jahre vor

Gelöst


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

fast 7 Jahre vor

Gelöst


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

fast 7 Jahre vor

Gelöst


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

fast 7 Jahre vor

Gelöst


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

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

fast 7 Jahre vor

Gelöst


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

fast 7 Jahre vor

Gelöst


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

fast 7 Jahre vor

Gelöst


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

fast 7 Jahre vor

Gelöst


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

fast 7 Jahre vor

Gelöst


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

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

fast 7 Jahre vor

Gelöst


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

fast 7 Jahre vor

Gelöst


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

fast 7 Jahre vor

Gelöst


Calculate some equation
Using given inputs x and z, make two outputs that are y1 = (xz)/(x/z)^2 + 14x^2 - 0.8z^2 y2 = x^z - z^x + (x/z)^2 - (z/x...

fast 7 Jahre vor

Gelöst


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

fast 7 Jahre vor

Gelöst


Area of rhombus
Calculate the rhombus area

fast 7 Jahre vor

Gelöst


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

fast 7 Jahre vor

Gelöst


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

fast 7 Jahre vor

Gelöst


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

fast 7 Jahre vor

Gelöst


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

fast 7 Jahre vor

Gelöst


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

fast 7 Jahre vor

Gelöst


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

fast 7 Jahre vor

Gelöst


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

fast 7 Jahre vor

Gelöst


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

fast 7 Jahre vor

Gelöst


Alkane
Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

fast 7 Jahre vor

Gelöst


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

fast 7 Jahre vor

Gelöst


Find the product of a Vector
How would you find the product of the vector [1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0] times 2?; x = [1 : 0.5 : 6]; y ...

fast 7 Jahre vor

Gelöst


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

fast 7 Jahre vor

Mehr laden