Java语言for循环的应用
1、package com.sinojava;public class Test1 {public static void main(String[] args) {// TODO Auto-generated method stubint count = 0;//能被3整除的个数for(int i=1;i<=100;i++){if(i%3==0){count++;System.out.println(i);}if(count>=5){break;}}}}
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:32
阅读量:84
阅读量:33
阅读量:78
阅读量:72