Pregunta de entrevista de Microsoft

Convert a string to int without using inbuilt libraries.