Gelöst


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

fast 10 Jahre vor

Gelöst


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

fast 10 Jahre vor

Gelöst


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

fast 10 Jahre vor

Gelöst


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

fast 10 Jahre vor

Gelöst


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

fast 10 Jahre vor

Gelöst


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

fast 10 Jahre vor

Gelöst


Negative Infinity
Round the given array a towards negative infinity.

fast 10 Jahre vor

Gelöst


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

fast 10 Jahre vor

Gelöst


Dosage by weight
A machine administer's medication dosage based on weight. Write an if-elseif-else statement that assigns the appropriate dosageA...

fast 10 Jahre vor

Gelöst


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

fast 10 Jahre vor

Gelöst


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

fast 10 Jahre vor

Gelöst


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

fast 10 Jahre vor

Gelöst


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

fast 10 Jahre vor

Gelöst


For loops: Savings account
The for loop calculates the amount of money in a savings account after numberYears given an initial balace of savingsBalance and...

fast 10 Jahre vor

Gelöst


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

fast 10 Jahre vor

Gelöst


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

fast 10 Jahre vor

Gelöst


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

fast 10 Jahre vor

Gelöst


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

fast 10 Jahre vor

Gelöst


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

fast 10 Jahre vor

Gelöst


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

fast 10 Jahre vor

Gelöst


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

fast 10 Jahre vor

Gelöst


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

fast 10 Jahre vor

Gelöst


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

fast 10 Jahre vor

Gelöst


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

fast 10 Jahre vor

Gelöst


Concatenate two strings
Its very easy. Just concatenate two strings.

fast 10 Jahre vor

Gelöst


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

fast 10 Jahre vor

Mehr laden