2)Write a VB Program to find sum of digit of a given number till it reduces to single digit.
Accept input through textbox and Display the output in Message Box (using function)
Option Explicit
Private Sub cmdDisplay_Click()
Dim num As Integer
num = Val(Text1.Text)
Dim sum As Integer
Dim reminder As Integer
While num>0
While num > 0
reminder = num Mod 10
sum = sum + reminder
num = num \ 10
Wend
num=sum
wend