登录
首页 » Windows开发 » « 问题描述: 给定一个自然数n,由n开始可以依次产生半数集set(n)中的数如下。 (1) n∈set(n); (2) 在n的左边加上一...

« 问题描述: 给定一个自然数n,由n开始可以依次产生半数集set(n)中的数如下。 (1) n∈set(n); (2) 在n的左边加上一...

于 2022-02-15 发布 文件大小:66.42 kB
0 162
下载积分: 2 下载次数: 1

代码说明:

« 问题描述: 给定一个自然数n,由n开始可以依次产生半数集set(n)中的数如下。 (1) n∈set(n); (2) 在n的左边加上一个自然数,但该自然数不能超过最近添加的数的一半; (3) 按此规则进行处理,直到不能再添加自然数为止。 例如,set(6)={6,16,26,126,36,136}。半数集set(6)中有6 个元素。 注意半数集不是多重集。集合中已经有的元素不再添加到集合中。 « 编程任务: 对于给定的自然数n,编程计算半数集set(n)中的元素个数。 « 数据输入: 输入数据由文件名为input.txt的文本文件提供。 每个文件只有1 行,给出整数n。(0

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 可用的条码打印控件
    可用的条码打印控件-available barcode printing controls
    2022-02-04 11:15:20下载
    积分:1
  • 使用算术表达式的计算器,且带有常用单位转换工具,在BCB2007下编译通过。...
    使用算术表达式的计算器,且带有常用单位转换工具,在BCB2007下编译通过。-The use of arithmetic expression calculator and unit conversion tool with a commonly used in the compiler under BCB2007 through.
    2022-03-05 07:46:40下载
    积分:1
  • javaWeb项目使用springboot集成redis
    javaWeb项目使用springboot集成redis                                                                                                                                                                                                                                                                                     
    2022-02-28 12:00:50下载
    积分:1
  • A very good vc++ProgrammingGuide book.
    A very good vc++ProgrammingGuide book.
    2022-12-12 10:40:04下载
    积分:1
  • MiniHex is an open source, compact and practical hexadecimal editor.
    MiniHex是一款开放源代码的、小巧而实用的十六进制编辑器。-MiniHex is an open source, compact and practical hexadecimal editor.
    2022-02-24 16:09:57下载
    积分:1
  • 空件编程,讲述空件常用方法,理论依据和方法
    空件编程,讲述空件常用方法,理论依据和开发方法-empty pieces of programming, commonly used pieces on the air, and the theoretical basis for the development of methods
    2023-06-22 09:30:03下载
    积分:1
  • 简单的图像浏览小
    简单的图像浏览小-simple small Eastern View images
    2022-02-05 18:02:42下载
    积分:1
  • 多普达710是SP系统的手机,此程序主要演示在710中操作捕获摄像头数据。这里用到了winbile上的CamSDK,效果不错。感谢作者。若加入视频压缩及网络传送...
    多普达710是SP系统的手机,此程序主要演示在710中操作捕获摄像头数据。这里用到了winbile上的CamSDK,效果不错。感谢作者。若加入视频压缩及网络传送功能则更好。-Dopod 710 is the SP system of mobile phones, the main demonstration of this procedure to operate in the 710 camera to capture the data. Here used the winbile on CamSDK, good results. Thank the authors. If the video compression and network transmission function better.
    2022-12-12 06:35:03下载
    积分:1
  • 求阶乘算法(0
    求阶乘算法(0---10000)标准C++语言控制台应用程序 可能很多人都曾经想过要实现一些比较大的数的阶乘,但是C++中提供的标准数据类型其存储空间太小,根本无法实现。我们可以通过其他方法来实现,本程序用一个很简单的算法实现数的阶乘,程序很短,也很简单,各处都有注释,相信大家很容易就可以看懂,下载源码后在VC6.0中打开编译后即可运行,程序经少许改动可以实现更大的数的阶乘,有兴趣的读者在看完本程序后可一动手试试,其乐无穷!!希望这个程序能给大家一点帮助-The arithmetic for counting factorial(0-10000) This is a standard C++ language console application, many people could want to relize the factorial of some large numbers, but the memory space of the standard data type provided by the C++ is too small, so it can not realize at all. But we can realize it by other method, the program realize the factorial of the number you give by a simple arithmetic ,this is a short and easy program, and there are remarks everywhere, I believe that everyone can easily understand it, after downloading the sound code you can open it in VC6.0, then edit and run it. you also can change something to realize the factorial of a larger number, the reader who is interesting in it can have a try, there are more happiness in it!! At last,
    2023-02-22 10:45:03下载
    积分:1
  • old procedures, but this could change the computation panel
    旧程序,但这可能会改变计算面板
    2022-08-13 05:46:22下载
    积分:1
  • 696518资源总数
  • 106155会员总数
  • 8今日下载