Develop a visual basic program that asks the user to enter an integer positive number, then reverse this number as a single integer and display it in a textbox. For example, if the user enters 235 the output should be 532. If the input is 79534 the output is 43597 (this means the input can accept any number of digits).

What code do you have so far? Where are you stuck/confused? What errors are you getting?

All too easy. Perhaps you are not as strong as the Emperor thought.

  • Darth Vader, “The Empire Strikes Back”
  1. Using the VB.net IDE put two text boxes on a form.
  2. For the OnChange event for the first box use the StrReverse method:
    Read https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.strreverse?view=net-5.0
  3. The code might be one line long but I can't tell what you called the second textbox name
    Maybe SecondTextBox.Text = StrReverse(FirstTextBox.Text)

Surely this can't be an assignment or homework. It's an one liner.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.