by Sachin Tiwari (3 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 29th January 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)
to tell the sum of the digits of a 3/4 digt number entered by the user
API Declarations
Dim a As Integer
a = Text1.Text
b = a Mod 10
c = (a - b) \ 10
k = c Mod 10
i = (c - k) / 10
n = i Mod 10
f = (i - n) / 10
Print b + k + n + f
End Sub
No comments have been posted about to tell the sum of the digits of a 3/4 digt number entered by the user. Why not be the first to post a comment about to tell the sum of the digits of a 3/4 digt number entered by the user.