作者TonyQ (骨头)
站内java
标题Re: [问题] 错在哪??????
时间Wed Aug 16 02:04:40 2006
※ 引述《stevevai (GOD)》之铭言:
: 第一次用递回写了a的b次方的程式~~~~
: import javax.swing.JOptionPane;
: public class REC
: {
: public static void main(String args[])
: {
: // int a;
: //int b;
: a=Integer.parseInt(JOptionPane.showInputDialog(null, "底数"));
: b=Integer.parseInt(JOptionPane.showInputDialog(null, "指数"));
: JOptionPane.showMessageDialog(null,fac(a,b));
^ ^
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: 这段错在哪???这边一直说我错 = =
错误讯息应该会告诉你 cannot find symbol
去查查这段错误讯息的意思吧
: }
: public static int fac(int a,int b)
: {
: if(b==1)
: return a;
: else
: return a*fac(a,b-1);
: }
: }
--
String temp="relax"; | Life just like programing
while(buringlife) String.forgot(temp); | to be right or wrong
while(sleeping) brain.setMemoryOut(); | need not to say
stack.push(life.running); | the complier will
stack.push(scouting.buck()); | answer your life
stack.push(bowling.pratice()); | Bone
everything
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.138.240.58