Private Sub btnDisplay_Click(…) Handles btnDisplay.Click Dim loopNum As Integer, answer As String = “”

$10.00

A number is prime if its only factors are 1 and itself.

 

SKU: Comp094545

1.Private Sub btnDisplay_Click(…) Handles btnDisplay.Click Dim loopNum As Integer, answer As String = “”

Do

If loopNum >= 1 Then

answer = InputBox(“Do you want to continue (Y/N)?”)

answer . answer.ToUpper

Else

answer = “Y”

End If

If (answer = “Y”) Or (loopNum = 0) Then

loopNum += 1

txtOutput.Text = CStr(loopNum)

End If

Loop Until (answer <> “Y”)

End Sub

 

2.The flowchart in Fig. 6.3 on the next page requests a whole number greater than 1 as input and factors it into a product of prime numbers. Note: A number is prime if its only factors are 1 and itself.

Reviews

There are no reviews yet.

Be the first to review “Private Sub btnDisplay_Click(…) Handles btnDisplay.Click Dim loopNum As Integer, answer As String = “””

Your email address will not be published. Required fields are marked *

Sorry no more offers available