Multiply a column by a row
* Given a column vector C and and a row vector R.
* Output a matrix M.
* Every column of M equals to C multiplied by correspon...
Summing digits
Given n, find the sum of the digits that make up 2^n.
Example:
Input n = 7
Output b = 11
since 2^7 = 128, and 1 + ...
2 years 前
已解决
Box!
Given a box, find the volume of the cube. With each side = a.
2 years 前
已解决
only input
Return the output without writing any code into the function.
2 years 前
已解决
Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'.
Examples
x = [ 1...
2 years 前
已解决
Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...