Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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]

casi 10 años hace

Resuelto


Negative Infinity
Round the given array a towards negative infinity.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Cargar más