Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
5年以上 前
解決済み
Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.
Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...
5年以上 前
解決済み
Remove the vowels
Remove all the vowels in the given phrase.
Example:
Input s1 = 'Jack and Jill went up the hill'
Output s2 is 'Jck nd Jll wn...
5年以上 前
解決済み
Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if
x = [1 2...
Find the minimal value in N*N Matrix
Suppose that we have N by N matrix, we try to find the minimal value in that matrix.
examples:
Input A=[1 2 3 5 6;52 58 56 45...
5年以上 前
解決済み
Is it prime?
Given a number, check whether it is prime or not.
If prime output is true, otherwise false.