class Apple::A
Public Instance Methods
abc()
click to toggle source
# File lib/apple.rb, line 6 def abc puts "---------------------enter a no.----------------------" a=gets # user will enter a number puts"" puts "-------------enter second numebr----------------------" b=gets puts"" c=a.to_i d=c+b.to_i # converting entered number to integer while c>0 puts "hello" c=c-1 end # ending while puts "the sun is #{d}" end