This works because you declared input to be "double" and so the calculation is done as a double.
vout=analogRead(0)/255*5;
This fails because analogRead returns a 16-bit integer and the whole calculation is done with 16-bit integer arithmetic. if the analogRead is 152 then 152/255 is zero.
therm=5*10000 it gives me -15536
Same problem. Both 5 and 10000 are 16-bit integers and the result won't fit in a 16-bit integer so you get a strange result.
You should read about how C/C++ handles arithmetic with different types of variables - i.e. 16-bit integers, 32-bit integers, floats etc.