Random Number Classifier (Form Designer)

Grade 12

This is a form-based problem — open it in the Form Designer, not the code judge. A button (btnGenerate) and a label (lblResult) are already on the form. Write btnGenerate's OnClick handler so that, each time it's clicked, it generates a random whole number from 1 to 100 and shows on lblResult whether that number is a multiple of 5 — in the exact format below.

No input/output in the console sense. Grading clicks btnGenerate once, then checks lblResult.Caption. If the generated number is a multiple of 5: 'Multiple of 5: <n>' (e.g. 'Multiple of 5: 55'). Otherwise: 'Not a multiple of 5: <n>' (e.g. 'Not a multiple of 5: 38'). Grading pins the random sequence to a known seed for two of the checks, so the exact number is predictable there — a third, unseeded check only verifies your message is in the right format, whatever number comes up. Either way, don't call Randomize yourself: it would only reseed from the clock and has no effect on correctness, since this problem never asks for a truly unpredictable draw.

Random Number Classifier─ ▢ ✕
lblResult
Generate

2 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