module Digits

Constants

VERSION

Public Instance Methods

digits(n) click to toggle source

Your code goes here…

# File lib/digits.rb, line 6
  def digits(n)

numbers=[]

(1..n).each do |x| numbers << x
end



str = numbers*""
puts "Enter the number of digits in your new number:"
#x = gets.chomp.to_i
str.slice! n..-1

puts str


end