Skip to content

Instantly share code, notes, and snippets.

#{Encoding:UTF-8}
puts "Sıcaklık değerini giriniz : "
t = gets.chomp.to_i
if t<0
puts "katı"
elsif t<100
puts "sıvı"
else
puts "gaz"
@omfaer
omfaer / nothesap3.rb
Created October 22, 2013 21:40
Hesaplama ve yuvarlama
#=> ={Encoding: UTF-8}
puts "Notları Hesapla \n"
puts "1.Arasınav Notunu Giriniz : "
as1 = gets.chomp.to_i
puts "2.Arasınav Notunuzu Giriniz : "
as2 = gets.chomp.to_i
puts "Final Notunuzu Giriniz : "
fin = gets.chomp.to_i
ort =as1*0.15 + as2*0.20 + fin*0.65
#=> ={Encoding: UTF-8}
puts "Notları Hesapla \n"
puts "1.Arasınav Notunu Giriniz : "
as1 = gets.chomp.to_i
puts "2.Arasınav Notunuzu Giriniz : "
as2 = gets.chomp.to_i
puts "Final Notunuzu Giriniz : "
fin = gets.chomp.to_i
ort =as1*0.15 + as2*0.20 + fin*0.65
#=> ={Encoding: UTF-8}
puts "Vize-Fİnal Hesaplama"
puts "Vize Notunu Giriniz : "
viz = gets.chomp.to_i
puts "Final Notunuzu Giriniz : "
fin = gets.chomp.to_i
ort =viz*0.4 + fin*0.6
puts "Dönem sonu ortalamanız : #{ort}"