文件名称:递归解决年龄问题
介绍说明--下载内容来自于网络,使用问题请自行百度
有5个人坐在一起,问第5个人多少岁,他说比第4个人大2岁。问第4个人多少岁,他说比第3个人大2岁。问第3人多少岁,他说比第2个人大2岁。问第2个人多少岁,他说比第1个人大2岁。最后问第1个人,他说他是10岁。编写程序,当输入第几个人时求出其对应的年龄。(5 people sat together and asked how old fifth people were. He said he was 2 years older than fourth. Asked how old fourth people, he said, 2 years older than third people. Asked how old the third were, he said, 2 years older than second. Asked how old second people, he said, 2 years older than first people. Finally asked first people, he said he was 10 years old. Write a program to determine the age when you enter the first few.)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
递归解决年龄问题.txt
提示.txt
提示.txt
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
