羊羹凍最簡單?原來這句話藏著超可愛的諧音梗!

圖片
Q: 準備哪種點心最簡單?  A: 羊羹凍 因為 羊凍勿麻煩(養動物麻煩) 可愛的幽默讓人會心一笑, 也讓甜點瞬間變得更親切。 #羊羹凍 #諧音梗 #幽默插畫 #甜點插畫 #可愛語錄 #美食幽默 #趣味圖文 #輕鬆圖文 #幽默問答

「swift2.0」repeat 和 for in 迴圈

repeat 跟C++的do-while 粉像的說

int i = 0;
do{
      cout<<i<<endl;
}while(i<100);

寫成swift的repeat就是

var i = 0
repeat {
    i++
    print(i)

} while i < 100


for in 加上SQL語法where 
迴圈+查詢語法 = 無敵

var scores = [ 10 , 20 , 30 , 40 ,50 ,60, 70]
for score in scores where  score <= 30 {
    print(score)
}
結果印出小於或等於30的分數^o^

留言