Class: Apple::A
- Inherits:
-
Object
- Object
- Apple::A
- Defined in:
- lib/apple.rb
Instance Method Summary collapse
Instance Method Details
#abc ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# 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 |