Friday or not
I love Friday. Please tell me whether the day is Friday.
Dateformat is 'yyyy-mm-dd' or 'dd-mmm-yyyy' or 'mm/dd/yyyy'.
Exa...
約4年 前
解決済み
Let's make puddings !
We will make puddings with eggs, milk and sugar.
To make one pudding, we need one egg, 140(cc) of milk, 15 (g) of sugar.
Now W...
約4年 前
解決済み
Square a Number
Given an input x, return y, which is equal to the square of x.
約4年 前
解決済み
Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0
Example
x = [ 3 3 4 6 1]
...
約4年 前
解決済み
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...
約4年 前
解決済み
Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.
約4年 前
解決済み
Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
約4年 前
解決済み
A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...
約4年 前
解決済み
what's my tax amount this year ?
given an annual salary x and a tax rate i calculate the amount that you have to pay.Example
x = 70000;
i=.10
y_correc...
short or buy ? take the opportunity
you had already calculated a theoretical stock value, now you checked in bloomberg the quoted price of that stock and you have t...
約4年 前
解決済み
currency converter
given a rate of exchange calculate the equivalent units of 100 USD
約4年 前
解決済み
Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...