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

📄 javacode.java

📁 Pasc+Java 这是一个国外的随机自动机*(RAM)一个学习用的程序
💻 JAVA
字号:
import javax.swing.*; import java.io.*; import java.awt.event.*; import java.awt.*; class JavaCode extends JFrame {public JavaCode(){setTitle("JavaCode"); setSize(100,100);addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){System.out.println("Ausfuerung abgebrochen");System.exit(0);}});JButton beenden=new JButton("Beenden");Container contentPane=getContentPane(); contentPane.add(beenden);beenden.addActionListener(new ActionListener(){public void actionPerformed(ActionEvent event){System.out.println("Ausfuerung abgebrochen");System.exit(0);}});}   private BigInt funktion0(BigInt variable0) throws IOException{      BigInt funktion0 = new BigInt("0"); // in Ries: fib      BigInt variable1 = new BigInt("0"); // in Ries: i      Array array0 = new Array(); // in Ries: fi      {         array0.set(new BigInt("0"),new BigInt("1"));         array0.set(new BigInt("1"),new BigInt("1"));         for (variable1 = new BigInt("2"); variable1.le(variable0); variable1 = variable1.add(new BigInt("1")))            array0.set(variable1,(array0.get((variable1.subtract(new BigInt("1")))).add(array0.get((variable1.subtract(new BigInt("2")))))));         funktion0 = array0.get(variable0);      }      return funktion0;   }   public static void main(String[] args) throws IOException{ JFrame frame=new JavaCode(); frame.show();      if (args.length != 1) {         System.out.println("Das Ries Programm hat genau 1 und nicht "+args.length+" Parameter.");         System.exit(1);      }      try {         for (int i=0; i<1; i++) {            BigInt trial = new BigInt(args[i]);         }      }      catch (NumberFormatException nfe) {         System.out.println("Bitte geben Sie nur Zahlen als Parameter ein.");         System.exit(1);      }      JavaCode programm = new JavaCode();      BigInt ergebnis = programm.funktion0(new BigInt(args[0]));      System.out.println("\nErgebnis: " + ergebnis);System.exit(0);   }}

⌨️ 快捷键说明

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