摘要:
打印5行三角形: package com.cheng.struct;public class TestDemo01 { public static void main(String[] args) { for (int i = 1; i <= 5; i++) {//i代表行数 有5行 for (i 阅读全文
posted @ 2021-05-25 21:01
Dudo1
阅读(58)
评论(0)
推荐(0)
摘要:
BreakAndContinue: Break: package com.cheng.struct;public class BreakDemo01 { public static void main(String[] args) { for (int i = 0; i < 100; i++) { 阅读全文
posted @ 2021-05-25 20:26
Dudo1
阅读(47)
评论(0)
推荐(0)
摘要:
增强for循环: package com.cheng.struct;public class IfDemo01 { public static void main(String[] args) { //增强for循环 int[] numbers = {10,20,30,40,50}; for(in 阅读全文
posted @ 2021-05-25 20:10
Dudo1
阅读(43)
评论(0)
推荐(0)
摘要:
while等循环: package com.cheng.struct;public class WhileDemo01 { public static void main(String[] args) { int i = 0; int sum = 0; while (i<100){//循环求1+2 阅读全文
posted @ 2021-05-25 17:45
Dudo1
阅读(220)
评论(1)
推荐(0)
摘要:
IF: if-else: package com.cheng.struct;import java.util.Scanner;public class Demo01 { public static void main(String[] args) { Scanner scanner = new 阅读全文
posted @ 2021-05-25 14:44
Dudo1
阅读(80)
评论(0)
推荐(0)

浙公网安备 33010602011771号