Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a loop that will populate a listbox with random values 14 pts The random numbers should range for ranging from 0 to 10 (10

  1. Create a loop that will populate a listbox with random values 14 pts
    1. The random numbers should range for ranging from 0 to 10 (10 must be a potential number that will be added).
    2. Keep adding values to the listbox until the sum of the values in the listbox equals or exceeds 100.
    3. After adding the values, tell me how many items are in the listbox, and the sum of the numbers, displaying these values in labels.
  2. Create a loop that will populate a listbox with random values 14 pts
    1. The random numbers should range for ranging from 0 to 10 (10 must be a potential number that will be added).
    2. Before adding the random number to the listbox, check to see if doing so would make the sum of the number exceed 100. If adding the number would cause the sum to exceed 100, do not add the number, and stop the loop. DONT insert the number if it would make your sum exceed 100.
    3. Report the current sum of the numbers, and the random number you just picked that would push the sum over 100. Put these values in labels.

Let the user enter a limit value .Create a loop that will calculate powers of 2 (i.e., 1, 2, 4, 8, 16 ) and place them into the listbox. You should stop the loop as soon as the calculated power of 2 exceeds the users limit value. If the user entered 10, you would end up with 1, 2, 4, 8, and then stop. If the user entered 16, you would end up with 1, 2, 4, 8, 16 in the listbox and stop.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

1. Outline the listening process and styles of listening

Answered: 1 week ago

Question

4. Explain key barriers to competent intercultural communication

Answered: 1 week ago