代码编写
今天你掉头发了么
这个作者很懒,什么都没留下…
展开
-
双重循环的一些想法
双重循环-----关于图形题的一些汇总 先贴出代码,最后总结 public class picture { public static void main(String[] args){ /* * ** *** **** *****原创 2021-03-31 22:59:06 · 75 阅读 · 0 评论 -
2021-03-29
数组与循环 //生成6个不重复的2位随机数 //1、6个 //2、如何证明不重复 Random rand = new Random(); //生成随机数 final int CAPACITY = 6; //确定数组长度为6 int[] nums = new int[CAPACITY]; //声明一个名叫nums的in原创 2021-03-29 21:35:22 · 62 阅读 · 0 评论 -
2021-03-25
今天学的基础————关于循环知识 //找出三位数当中所有的水仙花数 final short UNIT = 10;//降位处理 short num = 100,ones,tens,hundreds,copy,sum; while (num<1000){ copy = num; ones = (short)(copy%UNIT);//%返回值是int类型 copy /=UNIT;原创 2021-03-25 21:51:04 · 194 阅读 · 2 评论