# prac0203.rb
# ³ÑÅÙ¥¯¥é¥¹

class Angle
  def initialize(val,unit)
    if unit == 'rad' then
	@val = Math::PI * val / 180.0
    else
	@val = val
    end
  end

  def rad
    return Math::PI * @val / 180.0
  end

  def deg
    return @val
  end
end

a1 = Angle.new(60,'deg')
print a1.rad,"\n"
print a1.deg,"\n"