Draw 'S'
draw S using nxn matrix, where n is odd and greater than 4
S = [1 1 1 1 1
1 0 0 0 0
1 1 1 1 1
0 0 0 0 1
...
4 years ago
Solved
Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...
4 years ago
Solved
Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed.
Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...