Topic: 找不到原因(回文数 如输入1234 则输出4321) |
Print this page |
1.找不到原因(回文数 如输入1234 则输出4321) | Copy to clipboard |
Posted by: zhuzi0475 Posted on: 2005-10-09 10:01 请尽量用准确的文字描述作为标题 程序如下:没有错误但不能实现我的目的(回文数 如输入 1234 则输出4321 )不要求格式只求能出结果,请高手指点。
|
2.Re:找不到原因(回文数 如输入1234 则输出4321) [Re: zhuzi0475] | Copy to clipboard |
Posted by: why Posted on: 2005-10-09 22:14 I'm not interested in correcting your code but I would suggest using a method to do the 回文 operation, which could be as simple as String reverse(String string) { StringBuffer sb = new StringBuffer(string); return sb.reverse().toString(); } you may check the implmentation of StringBuffer's reverse() for details |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |