VB question

40 pts.
Tags:
Visual Basic
Visual Studio 2008
Write a program to input any numbers less than 50 by the user. As the output, display how many numbers did the user enter in a message box.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 10  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Okay, you described the task. Now, what is your question? What problem are you having? -- Tom
    125,585 pointsBadges:
    report
  • jackieserver
    This seems to be a school task.. We don't make your tasks here. If you make your program and have some problems you can ask it here and then we are here to help you.
    180 pointsBadges:
    report
  • PSN
    can you plz help me with this... Actually i dnt knw the answer.. the problem is, i dnt know which loop in structure or if statement should i use for this task.... i try all loops but i cant.. We can add many numbers less than 50..so how could i give my code.. i really need the code for this task...
    40 pointsBadges:
    report
  • ToddN2000
    How are the numbers being separated? tab, space or comma? What have you tried? Post you code so we can see. There are many ways to get your results, we can help you fix any issues you have with the method you chose and are most comfortable with.
    8,705 pointsBadges:
    report
  • PSN
    This is a code that I used to get the output... between here I can't enter more than one number. And message box is not displayng...


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim num, n As Integer
            num = TextBox1.Text
            n = 1
            Do While num < 50
                n = n + 1
            Loop
            MsgBox("You entered" & n & "numbers")
        End Sub
    40 pointsBadges:
    report
  • TomLiotta
    "...how could i give my code." . Just copy and paste it as text. It's probably best to paste it into Notepad first because a lot of tools include formatting controls when copied out of editors. . Tom
    125,585 pointsBadges:
    report
  • PSN
    Then how can I get your code?
    40 pointsBadges:
    report
  • TomLiotta
    You can only get one num value because you only ask for one value. If you need more values, you need to ask for more. Perhaps you should put the [ num = TextBox1.Text ] line inside if the DO-loop. However, after you do that, as soon as you enter the first value that is less than 50, your DO-loop will end. You should consider setting a different condition for your DO-loop. . Tom
    125,585 pointsBadges:
    report
  • manurung
    would you please help me. i want generate a large prime number (64 digits) and use fermat algorithm in visual basic. please help me. thank you
    10 pointsBadges:
    report
  • TomLiotta
    What does your code look like so far? VB might not be a very good choice for locating primes that large. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following