ABC interview question

write a program for converting string to number