程式: http://codepad.org/x34NnQiv
题目: http://codepad.org/IQnZDRNO
题目: http://codepad.org/IQnZDRNO
解决方案 »
- jsp servelet编码问题
- tomcat运行一段时间会乱码
- 使用post方式的AJAX登陆
- Timer实例化时,可以带个boolean型的参数,这个怎么用
- 我会用Apache Struts和Spring,为何还要学习Java EE 5前沿技术课程?
- hibernate 或者jpa中 mysql 统计问问题!!!!
- 各位大哥,eclipse有 jsp加亮显示的插件马?
- MM高分求用伪语言写个最简单的Junit程序,帮帮忙
- 有那位热心的高手能提供一些tapestry的资料感激不尽!
- 关于OGNL表达式中的问题
- hibernate 查询数据时,用什么方法可以避免不必要字段的检索
- spring2.5的AOP求解?
要求:
Note: n! means the factorial of n.
where n and k are integers and n > k.Write a Java application that performs the following functions:(i) prompt the user using a JOptionpane to input n and k, where n <= 10 and k <= 9
(ii) check that n <= 10 and n <= 9 and n > k; re-prompt the user if any input value is invalid
(iii) use a recursive method to calculate the factorials of n and k
(iv) calculate the value of the combination function C(n, k)
(v) display the results via an JOptionpane
注意第三条要求: 翻译一下:请使用递归方法计算……懂了吗?
你不知道什么是递归算法吗???google一下吧!三言两语还说不清。。而且你想的那个答案有点太那个了Java讲究思想你的程序完全没有体现出面向对象的思想。。有待加强啊!!!
因为你的答案不符合题目要求啊!!!
[/Quote]
>>>> http://codepad.org/8smMtvaA用了循环....但为什么是"0"
[/Quote]什么是0?