COMP2243 - Programming and Problem Solving

Syllabus Software Installation Assignments Tests
Lectures and Labs
**Back to Full Menu**

Selections/Decisions MinValue.java PrintingService.java QuadraticEquation.java PayrollWithDecision.java MultiSelection.java CalculatorWithSwitch.java GradeBookWithSwitch.java StringComparison.java



MinValue Program


Description

The purpose of this program is to use a one-way selection structure to determine the smallest value among three integers.

Associated Concepts:

One-way selection structure

Relational operator

Algorithm:

Declare variables to store data items

Read in three integers from the keyboard

Assume the first integer as the smallest

Use one-way selection structures to determine the smallest among three integers

Print the result

Source Code



Sample Run



Video