dEEpEst
☣☣ In The Depths ☣☣
Staff member
Administrator
Super Moderator
Hacker
Specter
Crawler
Shadow
- Joined
- Mar 29, 2018
- Messages
- 13,861
- Solutions
- 4
- Reputation
- 32
- Reaction score
- 45,552
- Points
- 1,813
- Credits
- 55,350
7 Years of Service
56%
[HIDE-THANKS][LANGUAGE=ruby]#!/usr/bin/env ruby
#
# Works out what the input integer is divisible by, useful for padbuster.
#
@input = ARGV[0]
def divisible?(i)
(@input.to_i % i).zero?
end
([email protected]_i).each_with_index do |i|
puts "#{@input} is divisible by #{i}" if divisible?(i)
end[/LANGUAGE][/HIDE-THANKS]
#
# Works out what the input integer is divisible by, useful for padbuster.
#
@input = ARGV[0]
def divisible?(i)
(@input.to_i % i).zero?
end
([email protected]_i).each_with_index do |i|
puts "#{@input} is divisible by #{i}" if divisible?(i)
end[/LANGUAGE][/HIDE-THANKS]