| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1603 人关注过本帖
标题:加分答题
取消只看楼主 加入收藏
Anstey
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2004-4-14
收藏
 问题点数:0 回复次数:2 
加分答题

OK刚刚我看C那里有一个叫有奖答题的东东。现在我也写个题目。第一个答对的有50分的加分(版主除外)。

In case you guys want to get used to Java English, i will write the whole thing in English

(In face, it is also a bit hard for me to translate all the Java word into Chinese,:P, sorry guys)

Ok, I promise the question i write (and maybe future??) will be nice and simple so that most of people here will actually have a chance to do this (and at least think).

=====================================================================

Here comes the Question.

Write a class, called Reverse.java, which takes an command line argument, and print that String back to the screen but in its reverse order.There are lots of ways to do the simple task!!!

For example:

C:\javaPro\java Reverse apple

elppa <<<<<this is the output

C:\javaPro\java Reverse a

a <<<<<<this is the output

C:\javaPro\java Reverse "apple tree"

eert elppa <<<<<<this is the output

(you can assume that the user will enter at lease one character so that no Exception will be ever thrown...

Extension: If no loop is allowed in this question, what will you do it? (if you could do without any loops in the class, +60 :-) )

Have Fun!!!

=====================================================================

Important: When you reply, do not just write a post and reply, please upload an attachment as a .java file (in this case Reverse.java), to do this, it will make much simpler when you are writing the program and it is also easy for others (including me) to check if your program works or not (since we can run it straightaway without copy and paste).

If you are the 1st, and 50 will be added!

[此贴子已经被作者于2004-09-15 21:04:05编辑过]

搜索更多相关主题的帖子: 答题 
2004-09-15 20:34
Anstey
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2004-4-14
收藏
得分:0 

虽然已经有第一个60, 因为只有一个回复,所以50仍然有效,so keep doing it.....!!!

可能问题简单了一点。。。呵呵,ANYWAY。。

下次会更难一点。。。。呵呵 maybe....


Anstey. Cheers. I love CAPPUCCINO~~
2004-09-16 15:31
Anstey
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2004-4-14
收藏
得分:0 

No, I am sorry, I have already added 60 to you....

Dont be too...... :


Anstey. Cheers. I love CAPPUCCINO~~
2004-09-17 16:48
快速回复:加分答题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017312 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved