- 博客(2)
- 收藏
- 关注
原创 【再看一遍,加减乘除】题解
@gantrol哥哥又来出新题啦! 这次的主题是通过递归来构造一些算数功能呢。这是链接 不废话啦,直接放我写的答案吧! 加 // 加2 // int+ -> int+ const add2 = (n) => { return add1(add1(n)); } //这个很简单啦,递归调用两次add1(),就是加一遍再加一遍 // 加4 // int+ -> int+ const add4 = (n) => { return add2(add2(n)); } //
2022-05-03 21:41:48
264
原创 我调用我自己——递归
https://blog.youkuaiyun.com/weixin_39518371/article/details/122910537 练习题解答 输入的count应当是让老和尚讲故事的数量,请据此修改函数boring_story let boring_story = (count) => { // count: 打印次数+1,就会多出一行故事,所以把>变成>=即可 if (count >= 0) { print_boring_story(); bor.
2022-02-13 19:50:42
534
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅