Zero or hero
A number will be given as an input. You can be hero if it's not zero.
(Just for fun)
2年以上 前
解決済み
Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.
2年以上 前
解決済み
Compute average gain for some bets.
Given a vector containg the odds of some events in decimal format (e.g., |odds=[1.3 2.5 1.5]| ) and a vector of the same dimensi...
Draw "C" in a zero matrix
Given a x-by-x matrix filled with zeros (x> 4). Use 1 to draw a letter C into it! Like this:
x = 5, y =
1 1 1 1 1
1 0 0 0 1
...
2年以上 前
解決済み
Draw "T" inside a Zero Matrix
Given a x-by-x matrix filled with zeros (x> 2). Use 1 to draw a letter "T" into it! Like this:
x = 5, y =
1 1 1 1 1
0 0 1 0 0...