Question

1. Backward String Design a program that prompts the user to enter a string and then...

1. Backward String Design a program that prompts the user to enter a string and then displays the string contents backward. For instance, if the user enters “gravity” the program should display “ytivar"

-VB or Visual Studio. It must be turned into a GUI program. Make sure to write comments and include pseudocode.

-Paste a screenshot of the pseudocode, the VB code, and of the program running into a PDF.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Here a new Windows Forms Application in VB is created using Visual Studio 2017 with name "WindowsAppVB".This application contains a form with name "Form1.vb".Below are the files associated with form1.

1.Form1.vb[Design]

2.Form1.vb

Public Class Form1
'Buttton click event
Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
'taking string entered by user
Dim str As String = txtString.Text
'converting string to character array
Dim charArray() As Char = str.ToCharArray()
'finding string length
Dim strLen As Integer = str.Length()
'using for loop printing string backword
For i = strLen - 1 To 0 Step -1
'concate each character from the string
lblResult.Text = lblResult.Text & charArray(i)
Next
End Sub
End Class

======================================================

Output : Run application using F5 and will get the screen as shown below

Screen 1 :

Screen 2:Screen showing backward string

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
1. Backward String Design a program that prompts the user to enter a string and then...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Design a program that prompts the user to enter a string, and displays the character that...

    Design a program that prompts the user to enter a string, and displays the character that appears most frequently in the string. (Please read the problem above carefully. I'm asking this question for the second time because the last answer I received wasn't even paying attention to what the question asked for.) Answer MUST be using Flowgorithm with screenshots. Please attach a screenshot of the program successfully running in flowgorithm as well to confirm proper output. Thanks for understanding!

  • This is with microsoft studio visual basic Sorted Names Design a program that allows the user...

    This is with microsoft studio visual basic Sorted Names Design a program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents.

  • write a C++ function that accepts a pointer to a C-string as an argument and displays...

    write a C++ function that accepts a pointer to a C-string as an argument and displays its contents backward. For instance, if the string argument is “ Gravity ” the function should display “ ytivarG ”. Demonstrate the function in a program that asks the user to input a string and then passes it to the function.

  • Write a program that prompts the user for a String value and a character value. The...

    Write a program that prompts the user for a String value and a character value. The program should then find the last occurrence of the provided character in the provided String and display the corresponding index. If the character is not found in the String, display -1. For additional challenge, create a multi-class solution. The business class should consist of two instance varaibles to store the user provided values and one method to accomplish the given task. The tester class...

  • Design a program in pseudocode that asks the user to enter a string containing a series...

    Design a program in pseudocode that asks the user to enter a string containing a series of ten single-digit numbers with nothing separating them. The program should display the sum of all the single digit numbers in the string except for the highest value digit. You may only use one main module and one sorting function; otherwise, do not modularize your program. For example, if the user enters 5612286470, the sum would be 33. (0+1+2+2+4+5+6+6+7) If there are multiple highest...

  • IN JAVA (Maximum consecutive increasingly ordered sub-string) Write a program that prompts the user to enter...

    IN JAVA (Maximum consecutive increasingly ordered sub-string) Write a program that prompts the user to enter a string and displays the maximum consecutive increasingly ordered sub-string. Analyze the time complexity of your program and explain. Here is a sample run: Enter a string: abcabcdgabxy output abcdg Time complexity is O( ). -n must be display between the parenthesis.

  • Write a program that prompts the user to enter a question (string) and display whether the...

    Write a program that prompts the user to enter a question (string) and display whether the question is correct. It is correct if it ends with the question mark (?) ----vyrovusmyzustning%20Class.pdf Programs with String Class Write a program that prompts the user to enter a question (string) and display whether the question is correct. It is correct if it ends with the question mark (?) Ask a question? Ask a question? How old are you What is your name? That's...

  • Total Sales Design a program that asks the user to enter a store’s sales for each...

    Total Sales Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result. Need: variable lists, IPO Chart, pseudocode, Flowchart, and working Python code. 2. Lottery Number Generator Design a program that generates a 7-digit lottery number. The program should have an Integer array with 7 elements. Write a loop...

  • The Assignment Design a Visual Logic flowchart for a program that prompts the user to enter...

    The Assignment Design a Visual Logic flowchart for a program that prompts the user to enter ten numbers one at a time. Use Console I/O (not the GUI interface). After the user has entered all ten number the program will then print out the total of those ten number and quit. Here is one example of what the program might look like when run: Please enter a number: 5 Please enter a number: 10 Please enter a number: 2 Please...

  • Write a program that prompts the user for a string and stores the user's string into...

    Write a program that prompts the user for a string and stores the user's string into a variable using getline(). After receiving the string, the program counts and displays the number of vowels in the string. Then, the program should prompt the user if they would like to enter another string.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT