class FooBizBaz { public static void main(String[] args) { for(int i=1;i<=150;i++){ System.out.print(i+""); if(i%3==0){ System.out.print("foo "); } if(i%5==0){ System.out.print("biz "); } if(i%7==0){ System.out.print("baz "); } System.out.println(); } } }
原文地址:http://9815936.blog.51cto.com/9805936/1600433