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

📄 randominteger.java

📁 北京邮电大学牛导的 JAVA课件课件及相关资料
💻 JAVA
字号:
import javax.swing.JOptionPane;public class RandomInteger {        public static void main(String[] args)     {        int rd,counter;        String output;        output = "the result is \n";        for (counter = 1; counter<= 20; counter++)        {            rd = 1+(int)(Math.random()*6);            output = output+ rd +" ";            if((counter %5)==0)                output= output+"\n";         }        JOptionPane.showMessageDialog(null,output,"random",JOptionPane.INFORMATION_MESSAGE);        System.exit(0);    }    }

⌨️ 快捷键说明

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