apple 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/apple.rb +17 -10
- data/lib/apple/version.rb +1 -1
- metadata +1 -1
data/lib/apple.rb
CHANGED
@@ -4,15 +4,22 @@ require "apple/version"
|
|
4
4
|
module Apple
|
5
5
|
class A
|
6
6
|
def abc
|
7
|
-
puts "enter a no
|
8
|
-
a=gets
|
9
|
-
|
10
|
-
|
7
|
+
puts "---------------------enter a no.----------------------"
|
8
|
+
a=gets # user will enter a number
|
9
|
+
puts""
|
10
|
+
puts "-------------enter second numebr----------------------"
|
11
|
+
b=gets
|
12
|
+
puts""
|
13
|
+
c=a.to_i
|
14
|
+
d=c+b.to_i # converting entered number to integer
|
15
|
+
while c>0
|
16
|
+
|
11
17
|
puts "hello"
|
12
|
-
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
x.
|
18
|
+
c=c-1
|
19
|
+
end # ending while
|
20
|
+
puts "the sun is #{d}"
|
21
|
+
end # ending method abc
|
22
|
+
end # ending class
|
23
|
+
x=A.new # making object of class A
|
24
|
+
x.abc # calling method abc
|
18
25
|
end
|
data/lib/apple/version.rb
CHANGED