addition 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/addition.rb +19 -13
  2. data/lib/addition/version.rb +1 -1
  3. metadata +1 -1
@@ -2,19 +2,25 @@ $: << File.dirname(__FILE__)
2
2
  require "addition/version"
3
3
 
4
4
  module Addition
5
- class A
6
- def abc()
7
- puts "Enter first no."
8
- x=gets
9
- puts"Enter second no."
10
- y=gets
11
- a=x.to_i
12
- b=y.to_i
13
- c=a+b
14
- puts "the sum is #{c}"
15
- end
5
+ class A
6
+ puts "Enter first no."
7
+ $x=gets
8
+ puts"Enter second no."
9
+ $y=gets
10
+ $a=$x.to_i
11
+ $b=$y.to_i
12
+ $c
13
+ def add()
14
+ $c=$a+$b
15
+ puts "the sum is #{$c}"
16
+ end
17
+ def mul()
18
+ $c=$a*$b
19
+ puts"the multiplication result is\n #{$c}"
20
+ end
16
21
  end
17
22
 
18
- x=A.new
19
- x.abc
23
+ v=A.new
24
+ v.add
25
+ v.mul
20
26
  end
@@ -1,3 +1,3 @@
1
1
  module Addition
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: addition
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: