Windows Forms Application – Control Structures Practice II

Lab Scenario
Design ONE Windows Form Application with three separate buttons, each button performing a different logical task related to:
Conditions
Switch statement
Loop structures
Form Design Instructions
Create a Windows Form with the following controls:
Form Name: FrmControlPracticeB
Controls to Add
| Control Type | Name | Purpose |
| Label | lblTitle | Display application title |
| TextBox | txtInput | User input |
| Button | btnCondition | Condition-based task |
| Button | btnSwitch | Switch-based task |
| Button | btnLoop | Loop-based task |
| Label | lblOutput | Display output |
Task 1: Condition (If / Else)
Button: btnCondition
Task Description
Enter a student's marks (0–100)
Display the result status based on marks:
75 and above → Distinction
50 – 74 → Pass
Below 50 → Fail
Expected Output
Example:
Input: 68
Output: Result: Pass
Task 2: Switch Statement
Button: btnSwitch
Task Description
Enter a number from 1 to 4
Display the corresponding menu option
Menu Mapping
| Input | Output |
| 1 | Add New Record |
| 2 | Update Record |
| 3 | Delete Record |
| 4 | View Records |
Task 3: Loop Structure
Button: btnLoop
Task Description
Enter a number N
Display all even numbers from 1 to N
Expected Output
Input: 10
Output: 2 4 6 8 10



