COMP2243 - Programming and Problem Solving

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

Fundamentals HelloWorld.java Basics.java Payroll.java Cartons.java Time.java DollarAmount.java StringPractice.java PayrollGUI.java



Basics Program


Description

This program uses variables to store different data values, assigns the hard-coded values to the variables, defines constants, calculates the results with the data stored in variables and constants, and prints the results.

It also demonstrates the usage of the division operator / and modulus operator %.

Associated Concepts:

Variables

Constants

Operators

Algorithm:

Declare variables

Define constant

Assign values to variables

Calculate results with values stored in variables and constant

Print results

Source Code



Sample Run



Video