Accion Labs Interview Question

write a program for string '1234'=10, i.e. 1+2+3+4=10