Which is the error?


#1

uts "Text to search through: "
text = gets.chomp
puts "Word to redact: "
redact = gets.chomp

words = text.split(" ")

words.each do |word|
if word != redact
print word + " "
else
print redact + " "
end
end


#2

Per instructions...

print "REDACTED "

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.