8 Aralık 2015 Salı

Ruby'de if anahtar kelimesi kullanımı

sayi = 15;

if sayi > 11
    puts "Sayi 11' den buyuk"
    if sayi < 44
        puts "Sayi 44'den kucuk"
    end
end
   
#sonuç:

  #Sayi 11' den buyuk
  #Sayi 44'den kucuk

Hiç yorum yok:

Yorum Gönder