Syntax error near unexpected token 'if'
for x in 1..100
if x % 3 == 0
puts "Fizz"
elsif (x % 5) == 0
puts "Buzz"
else
puts x
end
end
Syntax error near unexpected token 'if'
for x in 1..100
if x % 3 == 0
puts "Fizz"
elsif (x % 5) == 0
puts "Buzz"
else
puts x
end
end
Thank you for the help. I was running the program incorrectly in the terminal. (. / vs 'ruby')