package com.chongrui.test;

/*
*Break 是直接中止循环
*continue 只能运用在for while do ...while循环语句当中,用于让程序直接跳过后面的语句,进行下一次的循环
*return语句比较
* 输出10以内的全部奇数
*
* */


public class test {

public static void main(String[] args) {
int i = 0;
System.out.println("输出10以内的全部奇数:");
while(i<10){
i++;
if(i%2 == 0){
continue;

}

System.out.println(i+" ");

}


}
}

相关文章:

  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案