Risolto


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

oltre 9 anni fa

Risolto


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

oltre 9 anni fa

Risolto


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

oltre 9 anni fa

Risolto


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

oltre 9 anni fa

Risolto


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

oltre 9 anni fa

Risolto


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

oltre 9 anni fa

Risolto


Equal to their cube
Tell me three real numbers that are equal to their cubes?

oltre 9 anni fa

Risolto


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

oltre 9 anni fa

Risolto


05 - Vector Equations 3
Define the vector _dVec_: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 10) ...

oltre 9 anni fa

Risolto


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

oltre 9 anni 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 9 anni fa

Risolto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

oltre 9 anni fa

Risolto


Will there be a new leader?
Simply answer the title.

oltre 9 anni fa

Risolto


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

oltre 9 anni fa

Risolto


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

oltre 9 anni fa

Risolto


Negative matrix
Change the sign of all elements in given matrix.

oltre 9 anni fa

Risolto


Least common multiple of many numbers
1:6 -> 60

oltre 9 anni fa

Risolto


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

oltre 9 anni fa

Risolto


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

oltre 9 anni fa

Risolto


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

oltre 9 anni fa

Risolto


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

oltre 9 anni fa

Risolto


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

oltre 9 anni fa

Risolto


Small aircraft weight limit
Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

oltre 9 anni fa

Risolto


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

oltre 9 anni fa

Risolto


how to find size of a matrix?
how to find size of a matrix?

oltre 9 anni fa

Risolto


How to power of a given number&exponent?
How to power of a given number&exponent?

oltre 9 anni fa

Risolto


how to create zero square matrix with given order?
y-Zero square matrix with given input order x.

oltre 9 anni fa

Risolto


Writing a while loop
Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

oltre 9 anni fa

Risolto


While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...

oltre 9 anni fa

Risolto


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

oltre 9 anni fa

Carica altro