⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 例7-14.txt

📁 Java大学实用教程 耿祥义编著 课件 PPT
💻 TXT
字号:
import java.util.*;
class Example
{
   public static void main(String args[])
   {
      Stack<Integer> stack=new Stack<Integer>();
      stack.push(new Integer(1)); 
      stack.push(new Integer(1));
      int k=1;
      while(k<=10)
      for(int i=1;i<=2;i++)
      {
          Integer F1=stack.pop();
          int f1=F1.intValue();
          Integer F2=stack.pop();
          int f2=F2.intValue();
          Integer temp=new Integer(f1+f2);
          System.out.println(""+temp.toString()); 
          stack.push(temp);
          stack.push(F2);
          k++;
      }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -