Description -- Microsoft Studio, Visual Basic
Problem 6.1 Words Reversed - Write a program that uses a Do Loop so that the user may enter words using a popup Input Box. Once the user enters "STOP" , the program then displays all the words in a single string. The difficulty is that the words are displayed in reverse order with spaces. The program is initiated with a button. For example:
In case of any query do comment. Please rate your answer. Thanks
Code:
============form1.vb=======
Public Class Form1
'declare List of string to hold all the words entered
Dim words As New List(Of String)
Dim word As String
'Handles click of a button to ask user to enter words
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
words.Clear() 'clear the list
Do
'Ask user for input a word, if word entered is STOP then exit the
loop
word = InputBox("Enter words to be reversed, STOP to stop
entering", "Reverse Words")
If word.Equals("STOP", StringComparison.OrdinalIgnoreCase)
Then
Exit Do
Else
words.Add(word) 'add the word to the list
End If
Loop
'Join the words using space separator and show the output in a
label
words.Reverse()
Label2.Text = String.Join(" ", words)
End Sub
End Class
===========form1.designer.vb=============
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(160, 129)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(120, 34)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Input Words"
Me.Button1.UseVisualStyleBackColor = True
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(157, 67)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(42, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Output:"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(241, 67)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(0, 13)
Me.Label2.TabIndex = 2
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(585, 318)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents Button1 As Button
Friend WithEvents Label1 As Label
Friend WithEvents Label2 As Label
End Class
================screen shot of the code=======

Output:





Description -- Microsoft Studio, Visual Basic Problem 6.1 Words Reversed - Write a program that uses...
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.
using Microsoft Visual Studio C++ write a compute program that will allow the user to: 1.Get a Factorial (using a loop) 2. perform addition and subtraction 3.allow the user to quit the program
The questions below deal with Microsoft Visual Studio 2012
Reloaded, under the Visual Basic programming language. The book
ISBN number that I am using is: 978-1-285-08416-9 or the UPC code
is: 2-901285084168-1.
Question 1
Visual Basic 2012 is an object-oriented programming language,
which is a language that allows the programmer to use
____________________ to accomplish a program�s goal.
Question 2
An application that has a Web user interface and runs on a
server is called a(n) ____________________ application.
Question 3...
Problem 1: Dynamic Grocery Array Using Java to write a program that prompts the user to enter an item’s name for each position in the array. The program then prints uses a loop to output the array. Example 1: Banana 2: Orange 3: Milk 4: Carrot 5: Chips Banana, Orange, Milk, Carrot, Chips Problem 2: Print Characters in String Array Declare a string array of size 5. Prompt the user enters five strings that are stored in the array....
write a programming code for the following problem using
Visual Basic Studio VB.
Write a program that will allow the user to enter series of mumbers and will give some useful statistics about the mambers Enter Numbers Button Click-Allow the user to enter series of nambers using imput dialog boxes. Use a loop and add the numbers to the listBox as they are input.. Prompt the user to enter"x" to stop addang numbers. Compute Statistics Button Click-Compute the following statistics...
Write an encryption and decryption program that displays properly in Microsoft Visual Studio using c++. Encrypt each digit by adding 7 and taking the remainder after division by 10. After encrypting each digit, swap the first and third then swap the second and fourth. Decryption should reverse the process. Program must input a single integer. Program must do encode and decode in one file. Example Program Session (yours must look like this): Encode (1) Decode (2): 1 Enter...
Using Microsoft Visual Studio 2017 C++, write a C++ program to calculate to analyze the data from the number of visitors to Sleeping Bear Dunes in Michigan in 2015. Requirements Read the data from the Months.txt and Visitors.txt files. The text files are provided for you to download. The data was obtained from the National Park Service website. Design the program so the user enters a menu item and the following is displayed Display the chart below Totals and display...
C++ ONLY THANKS!
USE VISUAL STUDIO COMPILER ONLY!
Part 1: Exercise 1: Problem description Write a three function
program (your main function and two other functions). The main
function of the program should create an array that can store 10
integers. The main function will then pass the array to a second
function that gets the integers from the user and stores them in
the array. Then your main will call a third function that displays
the elements in the...
Microsoft Visual Studios 2017 Write a C++ program that computes a student’s grade for an assignment as a percentage given the student’s score and total points. The final score must be rounded up to the nearest whole value using the ceil function in the <cmath> header file. You must also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by...
This C++ Programs should be written in Visual studio 2017 PROGRAM 1: Comparing Using Arrays to Using Individual Variables One of the main advantages of using arrays instead of individual variables to store values is that the program code becomes much smaller. Write two versions of a program, one using arrays to hold the input values, and one using individual variables to hold the input values. The programs should ask the user to enter 10 integer values, and then it...