Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27379

Do loop help

$
0
0
My homework assignment is to:

Quote:

Create a new application that lets the user enter a number from 1 to 1000. Then generate a list of random values and place these in a listbox. Stop adding numbers as soon as the sum exceeds the number the user entered. Display the number of items and also the sum of the numbers on the form.
I'm lost as to how to do the third part. We're currently learning Do While, Do Until and For Next in class so I'm guessing I'll need to use Do Until? I just need someone to walk me through the logic, not necessarily spoon-feed me. Thank you in advance :)

Viewing all articles
Browse latest Browse all 27379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>