QuestionQuestion

You are to put the While loop on slide 23 into Visual Basic and run the code to show output. However, you are to make the following changes.

The loop is to iterate 30 times. Each iteration will increment the counter by 2 rather than 1. As a part of the Msgbox output you are to state “[Your name]’s program performed “ &   number of loops] & “ loops” {number of loops] MUST be present to the user as a variable or expression. It cannot be done as one predefined string(i.e. Msgbox("Mikes program performed 30 loops") this isn't acceptable.

Note: Keep in mind, the count of your loop iterations(counter) is being incremented by 2 not one! So the actual amount of times the loop iterates is NOT counter!

Slide 23
Dim counter As Integer = 0
While counter < 20
    counter += 1
    ' Insert code to use current value of counter.
End While
MsgBox("While loop ran " & CStr(counter) & " times")

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices

' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.

' Review the values of the assembly attributes

<Assembly: AssemblyTitle("Homework 5")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Homework 5")>
<Assembly: AssemblyCopyright("Copyright © 2018")>
<Assembly: AssemblyTrademark("")>

<Assembly: ComVisible(False)>

'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("a3840f0c-2c6d-42dd-b026-e26fa9d8d2d2")>

' Version information for an assembly consists of the following four values:
'
'      Major Version
'      Minor Version
'      Build Number
'      Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

$18.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Computer Science - Other Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats