Re: [問題] 錯在哪??????

看板java作者 (骨頭)時間19年前 (2006/08/16 02:03), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
※ 引述《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
文章代碼(AID): #14uWoEJs (java)
文章代碼(AID): #14uWoEJs (java)