Random Number in a Range (Form Designer)

Grade 12

This is a form-based problem — open it in the Form Designer, not the code judge. An edit box (edtOutput) and a button (btnRandom) are already on the form. Write btnRandom's OnClick handler so that each click generates a random whole number from 5 to 10, both included, and displays it in edtOutput.

No input/output in the console sense. Grading clicks btnRandom once with the random sequence pinned to a known seed, then checks edtOutput.Text is a whole number from 5 to 10.

Random Number in a Range─ ▢ ✕
Random number (5-10):
Random

3 components · drag to move, corner handle to resize, Delete to remove

Object Inspector

Select a component on the form to edit its properties.

Palette

Pick a component, then click the form

Standard

Additional

Data

Non-visual