文件名称:bukepai
-
所属分类:
- 标签属性:
- 上传时间:2014-05-22
-
文件大小:918byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1.写一个程序提示用户键入某一货币数量(以分为单位),该程序应计算出如何用最少量的1元,50分,10分和1分硬币得到该数目。如195分最少可以用一个1元硬币,1个50分硬币,4个10分硬币和5个1分硬币组成。
注意:可以不用数组。
2.写一个程序可以对两个字符串进行测试,得知第一个字符串是否包含在第二个字符串中。如字符串”PEN”包含在字符串“INDEPENDENT”中。
可以利用字符串类的方法
boolean regionMatches(int toffset, String other, int ooffset, int len)
关于本方法的说明可以在网上(如ORACLED的网站)查到,
(b)改进程序,当第一个字符串包含在第二个字符串中时,显示第一个字符串在第二个字符串中的起始位置。
(c)改进程序,即使当用户输入顺序错误时(第一个是长字符串,第二个是短字符串),能自动在长字符串中搜寻短字符串。
同花色的13张扑克牌,按照顺序A,2,3……10 J Q K排成一圆圈,从A开始,总是按照同一方向数。每数到第10张,便拿出来,再从下一个开始数,如此继续下去,问:最后剩下的那张扑克牌是哪张?
-1. Write a program that prompts the user to type in a certain currency amount (in divided into unit), the program should calculate the how to use the least amount of 1 yuan, 50 points, 10 points and penny to get the number 1. Such as 195 points can be used at least a $1 COINS, a 50 cent coin, four 10 points of COINS and five 1 cent coin.
Note: you can need not an array.
2. Write a program to test two strings, learned that the first string is included in the second string. Such as the string "PEN" included in the string "INDEPENDENT".
Can the method of using string class
Boolean regionMatches (int toffset, String other, int ooffset, int len)
For an explanation of this method can (such as ORACLED site) on the Internet,
(b) improvement program, when the first string contains the second string, showed the first word
注意:可以不用数组。
2.写一个程序可以对两个字符串进行测试,得知第一个字符串是否包含在第二个字符串中。如字符串”PEN”包含在字符串“INDEPENDENT”中。
可以利用字符串类的方法
boolean regionMatches(int toffset, String other, int ooffset, int len)
关于本方法的说明可以在网上(如ORACLED的网站)查到,
(b)改进程序,当第一个字符串包含在第二个字符串中时,显示第一个字符串在第二个字符串中的起始位置。
(c)改进程序,即使当用户输入顺序错误时(第一个是长字符串,第二个是短字符串),能自动在长字符串中搜寻短字符串。
同花色的13张扑克牌,按照顺序A,2,3……10 J Q K排成一圆圈,从A开始,总是按照同一方向数。每数到第10张,便拿出来,再从下一个开始数,如此继续下去,问:最后剩下的那张扑克牌是哪张?
-1. Write a program that prompts the user to type in a certain currency amount (in divided into unit), the program should calculate the how to use the least amount of 1 yuan, 50 points, 10 points and penny to get the number 1. Such as 195 points can be used at least a $1 COINS, a 50 cent coin, four 10 points of COINS and five 1 cent coin.
Note: you can need not an array.
2. Write a program to test two strings, learned that the first string is included in the second string. Such as the string "PEN" included in the string "INDEPENDENT".
Can the method of using string class
Boolean regionMatches (int toffset, String other, int ooffset, int len)
For an explanation of this method can (such as ORACLED site) on the Internet,
(b) improvement program, when the first string contains the second string, showed the first word
(系统自动生成,下载前可以参看下载内容)
下载文件列表
扑克牌.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.