Oppure

Loading
05/07/13 18:47
Nekra49
Salve, allora devo dividere un numero nelle sue singole cifre ( es. 1234 in 1 2 3 4)
come potrei fare?
aaa
05/07/13 18:54
Dedalux
Non c'entra molto la programmazione...
comunque è semplice

x = 1234

4 = x mod 10
123 = (x - 4) / 10
aaa
05/07/13 19:35
Nekra49
Ne sei sicuro?? come fanno dei numeri ad essere altre cose scusa?? 4 non puo essere x mod 10..
aaa
05/07/13 22:16
Dark_light
Dim ByteCount As Integer
        Dim IntNum As Integer
        Dim SplitChar As Char

        IntNum = TextBox1.Text

        For ByteCount = 1 To Len(CStr(IntNum))
            SplitChar = Mid(CStr(IntNum).Trim, ByteCount, 1)
            MsgBox(SplitChar)
        Next


:k::k:
aaa
06/07/13 15:56
Qwertj
Dim number As Integer = 1234
Dim chars As Integer() = number.ToString().ToCharArray().Cast(Of Integer)()
aaa
14/07/13 1:15
pincopallo
Postato originariamente da Nekra49:

Salve, allora devo dividere un numero nelle sue singole cifre ( es. 1234 in 1 2 3 4)
come potrei fare?


Ti conviene usare un array ;) Così avrai una cella per ogni cifra e non ci sono ambiguità...
aaa