- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
java编程小题(Java programming question)
java编程小题(Java programming question)
100 points, a few simple Java programming questions, to help solve!
Reward points: 100 - solve the time: 2009-7-5 14:28
Im a beginner for Java. This is the question set in the object oriented programming and Java of Tsinghua Press. No answer. Please help me!!!
(1) write methods static, int, methodl (int, x) and static, int, method2 (int, x), and use if and switch statements to calculate the values of the following functions, respectively:
2x-1 (x0)
3x+5 (0=x3)
F (x) = x+1 (3=x5)
5x-3 (5=x10)
7x+2 (x=10)
(2) there is a sequence of 1, 3, 6, 10, 15, 21, 28,,..., Tn-1, Tn, and each of them has the following recursive relation: Tn=Tn-1+N, T1=1 (followed by subscript)
Write and test the number of series N static, long, method (int, n)
(3) write a Java program that outputs all the daffodils between 100~999. The so-called narcissus number refers to a three digit, seven digit cube and equal to the number itself (such as 153=1s 3 party +5, the 3 party +3, the 3 party).
(4) a total of 800 yuan salary into 100 yuan, 50 yuan, 10 yuan 3 denominations of currency issuance, of which at least 5 hundred yuan ticket. Please write a Java program to calculate the allocation of 3 denominations of currency programs.
Halo ~ Im looking for JAVA technician, ask such a simple thing, I asked the first book, the second chapter of after-school exercises, you say how difficult it is!
Questioner: Xin Jie Mead - three best answer I report is not good
There used to be similar exercises
Revised a hair on the hair
I agree with the idea downstairs and do it myself
If you dont understand anything, you can refer to my this one
Maybe you have a better solution
One
Import java.util.Scanner;
Public class Test_If_Switch
{
Public, static, void, main (String[], args) {
System.out.println (enter a number:);
Scanner SC = new Scanner (System.in);
Int x = sc.nextInt ();
System.out.println (method 1:, +methodl (x));
System.out.println (method 2:, +method2 (x));
}
Static int metho
您可能关注的文档
- 25水调歌头(25 Prelude To Water Melody).doc
- 25所最佳商学院的emba项目(EMBA project at the 25 best business schools).doc
- 28.2 物料入库信息查询(28.2 material storage information inquiry).doc
- 28万亩苹果成为农民致富靠山(280 thousand acres of apples become the patron of farmers).doc
- 28种粥(28 kinds of congee).doc
- 2oo9届全国大联考高三第一次联考·生物试卷及答案(2oo9 national high entrance exam the first three exam, biological papers and answers).doc
- 2、安全技术措施计划的项目总名称表(2. The general name list of safety technical measures plan).doc
- 2习题 第二章 热力学第二定律(2 exercises second chapter thermodynamics second laws).doc
- 2刺血术(2 bloodletting).doc
- 2型糖尿病对胃癌病人术后近期结局的影响(Effect of type 2 diabetes mellitus on postoperative short-term outcome in patients with gastric cancer).doc
- java编译参数大全(Java compilation parameters Daquan).doc
- java解压zip乱码问题(Java decompression zip garbled question).doc
- java编译贪吃蛇(Java compiled snake).doc
- jfreechart生成折线图并保存为图片(JfreeChart generates a line chart and saves it as a picture).doc
- java编程学习步骤(Java programming learning steps).doc
- jiaoyu(教育).doc
- jsp编程2010(JSP programming 2010).doc
- jit-即时编译(Jit- instant compile).doc
- just be friends 歌词 平假名罗马音对照(只是朋友歌词平假名罗马音对照).doc
- k11防水涂料做屋顶防水(K11 waterproof paint for roof waterproof).doc
最近下载
- 党务工作者应知应会问答.pdf VIP
- 校服供货服务方案.docx VIP
- 2020部编版六年级下册语文(全册)同步练习及答案 精编版.pdf VIP
- 高一上学期统编版历史必修中外历史纲要(上)期中复习中国古代史专题练习.docx VIP
- 2022年人教版八年级下册英语 Unit 8 Have you read Treasure Island yet 单元教案 .pdf
- 2.3.1喀斯特地貌 高中地理湘教版必修一.pptx VIP
- YB∕T 4968-2021 冷轧钢带单位产品能源消耗限额.docx VIP
- 硬笔书法系列《硬笔书法指导》.ppt VIP
- 部编版小学六年级语文下册同步练习.pdf VIP
- 上班族心理健康课件最新完整版本.pptx VIP
原创力文档


文档评论(0)