您好,欢迎光临本网站![请登录][注册会员]  

搜索资源列表

  1. 编写一个Java应用程序,产生20个50-100之内的整数,并输出这20个数并找出最大数及最小数输出

  2. 思路: 首先调用random()方法产生随机数,用数组存储,然后用两个for循环求出其中的最大值和最小值,最后打印输出这两个最值。 代码实现: public class Test { public static void main(String args[]){ int a[] = new int[20]; System.out.println(20个随机整数为:); for(int i = 0; i < 20; i++){ int random_num = (int
  3. 所属分类:其它

    • 发布日期:2021-01-20
    • 文件大小:37kb
    • 提供者:weixin_38554186