使用任何编程语言在1到9之间生成两个随机数字(包括两者)。那么您的程序应该显示:
例如,如果生成了数字"9“和"2”,您的程序应该准确地显示:
9
2
92
8464发布于 2018-10-31 13:16:21
^
i,
hO9
hO9T2注意,换行符很重要。试一试在线这里。
解释,换行符改为字符:
^¶i,¶hO9¶hO9T2 Implicit: T=10
O9 Choose a random number in [0-9)
h Increment
¶ Output with newline - value printed is yielded as expression result
¶hO9 Do the above again
, Wrap the two previous results in a two-element array
i T Convert to decimal from base 10
¶ Output with newline
^ 2 Square the previous result, implicit printhttps://codegolf.stackexchange.com/questions/175006
复制相似问题