you need to take
end
as input from the user, not hardcode it. Also as it is in your code, you don't store the user input in a variable