ABC Interview Question

write a program for converting string to number