文件名称:1.8
下载
别用迅雷、360浏览器下载。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
如迅雷强制弹出,可右键点击选“另存为”。
失败请重下,重下不扣分。
介绍说明--下载内容均来自于网络,请自行研究使用
一本书的页码从自然数1开始顺序编码直到自然数n。书的页码按照通常的习惯编排,每个页码都不含多于的数字0,例如,第6页用数字6表示,而不是06或者006等。现在需要编写一个方法int[] CaculateNumber(int n),给它一个书的总页码n,方法能有个返回值,它记录了在给定的页码n中0,1,2….9数字出现的次数(如页码67表示6和7各出现了一次)。数组一共九个元素,0出现的次数记录在数组索引为0的元素中,依次类推。-A book page from the natural number 1 until the beginning of coding sequence of natural number n. Book page number in accordance with the usual habit of scheduling, each page does not contain more than the figures are 0, for example, p. 6 in figures 6 that, rather than 06 or 006 and so on. Now need to prepare a method int [] CaculateNumber (int n), to give it a book s total page number n, can have a return value, it records the page number in a given n in the figures 0,1,2 ... .9 number (such as page 67 that the emergence of 6 and 7 a). A total of nine elements in the array, 0 the number of records appears in the array index of the element to 0, and so on.
相关搜索: 索引
(系统自动生成,下载前可以参看下载内容)
下载文件列表
第八题.docx