Ask Experts Questions for FREE Help !
Ask
    lamlamlamiaaa's Avatar
    lamlamlamiaaa Posts: 28, Reputation: 2
    New Member
     
    #1

    Apr 12, 2012, 05:18 PM
    Reverse a String in Visual Basic
    I want to make a program where the user enters a word and it will come out backwards.
    For Example:
    Basic -> cisaB

    Please and Thank you!
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Apr 12, 2012, 05:22 PM
    Use a For... Next loop to loop for the length of the string. With each pass of the loop Use the Right() function to grab the last character and add it to a new string. Then use the Left() function to replace the string with the remaining characters.
    lamlamlamiaaa's Avatar
    lamlamlamiaaa Posts: 28, Reputation: 2
    New Member
     
    #3

    Apr 13, 2012, 06:29 AM
    Can you explain a bit more how to use the Right() and Left() function?
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #4

    Apr 13, 2012, 08:08 AM
    I'm assuming this is a homework question. That's why I didn't show you a code sample. I just gave you enough direction to find the answer. There are plenty of VB resources that explain how to use the Right and Left functions and Loops that you can look up.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Visual Basic [ 3 Answers ]

hi, I am using Access as my DB. I want to save a value in one table in DB. But the value am saving shd exists in database in another table. i.e. that value hs to be compared with the other table .Only if it exists then it has to be saved. How to do it.

Something about Visual Basic. [ 3 Answers ]

May anyone tell me how to do this calculation,the code into Visual Basic? (Question) If the user inputs 15 and 3, the first number is a multiple of the second. If the user inputs 2 and 4, the first number is not a multiple of the second.

Visual Basic [ 1 Answers ]

Actually I'm a new user(student) of Visual Basic.So I want to know how I am make a simple calculator in Visual Basic 6?


View more questions Search