Solved


Concatenate string with cell array of strings
Given a cell array of strings (a), a target string (b), and a target position (ind), return a cell array of strings (c) in which...

meer dan 4 jaar ago

Solved


Add consecutive integer numbers
Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

meer dan 4 jaar ago

Solved


last non-zero digit
given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

meer dan 4 jaar ago

Problem


Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

meer dan 4 jaar ago | 1 | 34 solvers

Problem


Be happy
check whether the given number is happy in b-base

meer dan 4 jaar ago | 2 | 30 solvers

Solved


Bouncy numbers
Inspired by Project Euler n°112. * * Working from left-to-right if no digit is exceeded by the digit to its left it is call...

meer dan 4 jaar ago

Solved


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

meer dan 4 jaar ago

Solved


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

meer dan 4 jaar ago

Solved


Construct a string from letters and counts
Given two input arrays like this: [5,3,1] ['a','b','c'] Output a string that contains each letter the specified num...

meer dan 4 jaar ago

Solved


Join Strings with Multiple Different Delimiters
The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

meer dan 4 jaar ago

Solved


The last non-zero digit of a factorial
For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

meer dan 4 jaar ago

Solved


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

meer dan 4 jaar ago

Solved


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

meer dan 4 jaar ago

Solved


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

meer dan 4 jaar ago

Solved


Dice face matrix!
This is dice simulator, but instead of making a random die number, you will receive an "pre-rolled" number in and spit out a mat...

meer dan 4 jaar ago

Solved


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

meer dan 4 jaar ago

Solved


Produce the following matrix
Produce the following matrix x = [2 3 4] y_correct = [1 1/2 1/3; 2 1 1/4; 3 4 1];

meer dan 4 jaar ago

Solved


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

meer dan 4 jaar ago

Solved


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

meer dan 4 jaar ago

Solved


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

meer dan 4 jaar ago

Solved


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

meer dan 4 jaar ago

Solved


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

meer dan 4 jaar ago

Solved


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

meer dan 4 jaar ago

Solved


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

meer dan 4 jaar ago

Solved


Generate a Parasitic Number
This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

meer dan 4 jaar ago

Solved


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

meer dan 4 jaar ago

Solved


Frugal number
check whether n is a frugal number

meer dan 4 jaar ago

Problem


Frugal number
check whether n is a frugal number

meer dan 4 jaar ago | 2 | 43 solvers

Solved


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

meer dan 4 jaar ago

Solved


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

meer dan 4 jaar ago

Load more