# prac0401.rb

class Triangle
  def initialize(teihen,takasa)
    @teihen = teihen
    @takasa = takasa
  end
  def menseki
    return @teihen * @takasa / 2.0
  end
end

class Rectangle
  def initialize(teihen,takasa)
    @teihen = teihen
    @takasa = takasa
  end
  def menseki
    return @teihen * @takasa
  end
end

class Circle
  def initialize(hankei)
    @hankei = hankei
  end
  def menseki
    return Math::PI * @hankei ** 2
  end
end