Alternatives
Members may post updates or alternatives to this current article in order to show different
approaches or add new features.
For Each digit In (TextBox4.Text + TextBox5.Text + TextBox6.Text).ToCharArray() i += CInt(digit)Convert it to a CharArray first
I would create a function, that took a string as it's parameter, and returned a value that was the digits added together.Private Function AddDigits(s As String) As Integer Dim result As Integer = 0 For Each c As Char In s If [Char].IsDigit(c) Then result +=...
28 Dec 2012Thomas Daniels
Hi,Try this:Private Sub KryptonButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click Dim i As Integer = 0 Dim l As Integer = 0 Dim lcn As String = "" If String.IsNullOrEmpty(textBox4.Text) AndAlso String.IsNullOrEmpty(textBox5.Text)...
'' This is a Very Simple Solution applicable for any Number, It Based on Simple Maths' It so Easy, No need to Work with Loops or Goto's'' Any Number (Mod) 9 = Sum Of Digits'' 12 Mod 9 = 3' 21 Mod 9 = 3' 28 Mod 9 = 1 (2+8 = 1+0 = 1)' One Validation of Any Number / 9 = 0 then...
28 Dec 2012charuwaka 5 alternatives
i made a text 3 text boxes and one button in that three text boxes i enter DOB like ex:21 07 1993 format in textboxes 4,5,6 i will get out put as 2+1+0+7+1+9+9+3=34>3+4=7 in that means 7 will come as output in 7th text box. my problem if enter b'day like :1 3 1986 > 1+3+1+9+8+6=28 > 2+8=10...
Bond is a Physics student in a college in Nigeria.
Started programming right after high school and has fallen in love with computers ever since. Likes using the word 'seriously' and is a big fan of movies especially sci-fi.
Bond is a precise, honest, caring, down to earth gentleman.
He understands that being negative is easy. There will always be a downside to everything good, a hurdle to everything desirable and a con to every pro. He has realized that the real courage is in finding the good in what you have, the opportunities in every hurdle and the pros in every con.