文件名称:1.8
介绍说明--下载内容来自于网络,使用问题请自行百度
一本书的页码从自然数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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.