oops_can 0.0.3 → 0.0.11
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.
- checksums.yaml +4 -4
- data/lib/oops_can/version.rb +1 -1
- data/lib/oops_can.rb +27 -8
- data/oops_can.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff097c69b571642f4d71a18999410bb8a99bafb6
|
4
|
+
data.tar.gz: c978bcee5fbe5cc5281f55243d8bd305dd62b2ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7cdaceefecec570852c9f9613e17ece27b9df35a6476dede76b79aecd6da69a1756a59e18d9cadf7955b11cfa0494e9ff981727bf9c88f34ccfd8e0a8581c46
|
7
|
+
data.tar.gz: 2d33c1547ebe9b7b4aea7e3410e216993f605abfccfcee6c78ffb351b873725dc5ffafe8c3ed0247842aaf2591ee64fe9f42f3c524b06553c57f7b36266b66a5
|
data/lib/oops_can/version.rb
CHANGED
data/lib/oops_can.rb
CHANGED
@@ -1,11 +1,30 @@
|
|
1
1
|
require "oops_can/version"
|
2
|
-
class
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
class Discriminant
|
3
|
+
def self.answer
|
4
|
+
|
5
|
+
puts "Please input the A: "
|
6
|
+
a = gets.to_i
|
7
|
+
|
8
|
+
puts "Please input the B: "
|
9
|
+
b = gets.to_i
|
6
10
|
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
end
|
11
|
+
puts "Please input the C: "
|
12
|
+
c = gets.to_i
|
11
13
|
|
14
|
+
|
15
|
+
d = (b**2) - (4 * a * c )
|
16
|
+
puts "Discriminant: #{d}"
|
17
|
+
if d > 0 then
|
18
|
+
|
19
|
+
x1 = (b - (d ** 0.5))/(2 * a)
|
20
|
+
x2 = (b + (d ** 0.5))/(2 * a)
|
21
|
+
puts "x1: #{x1}"
|
22
|
+
puts "x2: #{x2}"
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
else
|
27
|
+
puts "Not Found X's"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/oops_can.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Ubuntus"]
|
10
10
|
spec.email = ["uxx_zz@mail.ru"]
|
11
11
|
spec.summary = %q{Hola!}
|
12
|
-
spec.description = %q{A simple
|
12
|
+
spec.description = %q{A simple discriminant gem}
|
13
13
|
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oops_can
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ubuntus
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: A simple
|
41
|
+
description: A simple discriminant gem
|
42
42
|
email:
|
43
43
|
- uxx_zz@mail.ru
|
44
44
|
executables: []
|