DIM X, A, B AS INTEGER INPUT X A=0: B=1 WHILE (X MOD 10) > 1 A = A+(X MOD 10) B = B*2 X = X\10 WEND PRINT A PRINT B