puts "hello "\
"world" if false
class Person
@@count =0
def initialize (name , age=18)
@name = name
@age = age
@motherland = "china"
end
def talk
print "name="+ @name +"\n"
puts "age ="+ @age.to_s
print "motherland="+ @motherland +"\n"
end
attr_writer:motherland
end
class Student < Person
def talk
puts "I am a student"
print "name="+ @name +"\n"
puts "age ="+ @age.to_s
print "motherland="+ @motherland +"\n"
end
end
p1 =Student.new("some",25)
p1.talk
=begin
def shushu(n)
for i in 2..n
isshu = true
for p in 2...i
if i%p==0
isshu = false
end
end
puts i," " if isshu
end
end
temp=gets()
shushu(20)
=end