Pergunta de entrevista da empresa Microsoft

Convert a string to int without using inbuilt libraries.