a1426kt_prime_number 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0edcdf0ce1d1b790576c26a61bb22253ed1b6d38
4
- data.tar.gz: e26d284916f38ac62f3245445569a8dae621582f
3
+ metadata.gz: 2a47b79953b3a97b342e1392204fd0e45eb2580a
4
+ data.tar.gz: e95956b2581383d5e8bddb2ccd100c5394ae9650
5
5
  SHA512:
6
- metadata.gz: 81484f4491e6e4a6d80d8dcabda70c9c9f16b4dc2762fb9e8c844f4bc4dec39fecc9fb9c158abc51b4fdba50d26f728e4d73dfc6d416b9b6e526df0198f161ea
7
- data.tar.gz: 07c49ba68e05e90c4109f7b6c99899ce5a873a5bbea05391d8699a88c8fdaf0b57c0bc5265c808b269028310346b2a523e78987b968e9c1fb6a88c5aff5ec447
6
+ metadata.gz: 9ed0fe538bb5d9c9f6ed58abce7f1e3ae5764de5a6896617fb8b2f4e3206109dd0c739d4d7f9f169e955967bed38444e2b1736eb90be6da5ee247186c3267b34
7
+ data.tar.gz: 64e1721369cf135a91aecae3b4ec63a34f00e5cafdddea68232e4dd530ea4b892f592ae1fac12c27f264543180be985d37da0561424b1b7c462f0407f425320f
@@ -1,5 +1,24 @@
1
1
  require "a1426kt_prime_number/version"
2
2
 
3
- module A1426ktPrimeNumber
3
+ class A1426ktPrimeNumber
4
+ #module A1426ktPrimeNumber
4
5
  # Your code goes here...
6
+ def determine_prime(num)
7
+ if num == 1 || num == 2 then
8
+ return "This is the prime number."
9
+ end
10
+ if num % 2 == 0 then
11
+ return "This is not the prime number."
12
+ end
13
+ i = 3
14
+ while true
15
+ if num == i then
16
+ return "This is the prime number."
17
+ end
18
+ if num % i == 0 then
19
+ return "This is not the prime number."
20
+ end
21
+ i = i + 2
22
+ end
23
+ end
5
24
  end
@@ -1,3 +1,3 @@
1
1
  module A1426ktPrimeNumber
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a1426kt_prime_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kikuko toda
@@ -51,6 +51,7 @@ files:
51
51
  - LICENSE.txt
52
52
  - README.md
53
53
  - Rakefile
54
+ - a1426kt_prime_number-0.0.2.gem
54
55
  - a1426kt_prime_number.gemspec
55
56
  - bin/a1426kt_prime_number
56
57
  - lib/a1426kt_prime_number.rb