QTP Interview Questions
Showing posts with label
Amazon Testing Interview Questions
.
Show all posts
Showing posts with label
Amazon Testing Interview Questions
.
Show all posts
Sunday, February 10, 2013
Find the sum of the digits till the sum reaches to a single digit
no=54563 'You can give any number you want
While no>0
modValue=no mod 10
result=result+modValue
no=int(no/10)
If no=0 and result >9 Then
no=result
result=0
End If
Wend
print result
Older Posts
Home
Subscribe to:
Posts (Atom)