You first try to calculate the velocity but input values later. Before you take user's input the values contain garbage and of course the calculation doesn't make sense.
Move line 12 to line 20. And I think you need variables to be floats instead of ints for better precision.