I am currently writing a program that when a user enters a number such as 1267 and clicks a button the number will then be
broken down by its ones place, tens place, and so on. So it would show up as One place is: 7, Tens place is: 6, and so on.
Well I need a little help trying to figure out what code I would write to test or separate each single integer. So far I have only been able to separate the ones place using:
Dim ones As Integer = Microsoft.VisualBasic.Right(TextBox1.Text, 1)
'display each value in the corresponding place
Label11.Text = ones
of course this code wouldnt work for the rest of the digits entered.
If a user were to enter a bigger number lets say:
12345
then i would need to display
thousands place is: 12
hundreds place is: 3 and so on and so on
Any help is greatly appreciated
Thanks
broken down by its ones place, tens place, and so on. So it would show up as One place is: 7, Tens place is: 6, and so on.
Well I need a little help trying to figure out what code I would write to test or separate each single integer. So far I have only been able to separate the ones place using:
Dim ones As Integer = Microsoft.VisualBasic.Right(TextBox1.Text, 1)
'display each value in the corresponding place
Label11.Text = ones
of course this code wouldnt work for the rest of the digits entered.
If a user were to enter a bigger number lets say:
12345
then i would need to display
thousands place is: 12
hundreds place is: 3 and so on and so on
Any help is greatly appreciated
Thanks