我就不吃芹菜

导航

 

2015年9月30日

摘要: 1 public class qwer{ 2 public static void main(String [] args){ 3 int b = 0; 4 while(b <= 100) 5 { 6 ... 阅读全文
posted @ 2015-09-30 19:25 我就不吃芹菜 阅读(602) 评论(0) 推荐(0)
 
摘要: 课堂上出了这样一道题目,输出0-9,中间的5不能输出,用三元运算符解决这个问题。1 int w;2 w = 0;3 while(w < 10)4 {5 w = (w != 5)?w : ++w;6 System.out.pri... 阅读全文
posted @ 2015-09-30 13:35 我就不吃芹菜 阅读(276) 评论(0) 推荐(0)
 
摘要: 1 int c = 0; 2 intg = c%2; 3while(c<=100) 4 { 5 6 if(g == 1) 7 { 8 System.out.println(c); 9 } 10 c++; 11 }自己看了很久没看出来... 阅读全文
posted @ 2015-09-30 12:57 我就不吃芹菜 阅读(337) 评论(0) 推荐(0)