摘要: package zrs; public class javaDay03_3 { public static void main(String[] args) { //循环的嵌套 for(int x=0;x<3;x++) {//外循环控制行 for(int y=0;y<4;y++) { //内循环控制 阅读全文
posted @ 2018-11-01 15:31 ZRS_009 阅读(206) 评论(0) 推荐(1) 编辑
摘要: package zrs; public class javaDay03_2 { public static void main(String[] args) { //for循环 int sum=0; for(int x=1;x<=10;x++) { sum=sum+x; } System.out.p 阅读全文
posted @ 2018-11-01 14:14 ZRS_009 阅读(168) 评论(0) 推荐(0) 编辑
摘要: package zrs; public class javaDay03 { public static void main(String[] args) { //while循环 int x=1; while(x<5) { //大括号里面叫做循环体,循环需要一个结束循环的条件,来控制次数,不然就会形成 阅读全文
posted @ 2018-11-01 13:51 ZRS_009 阅读(160) 评论(0) 推荐(0) 编辑