-->

AD

 DECLARE SUB SUM(N)

Cls

Input "ENTER ANY NUMBER"; N

Call SUM(N)

End


Sub SUM (N)

    While N <> 0

        R = N Mod 10

        S = S + R

        N = N / 10

    Wend

    Print "THE SUM OF ALL THE DIGITS IS "; S

End Sub


1 Comments

Post a Comment

Previous Post Next Post
CLOSE ADS
CLOSE ADS