CIS 3931 - Elementary Java Programming
Code Examples - Control Structures
TestIfElse.java
- Mortgage Computation illustrating the use of if/else statements to decide the interest rate.
TestWhile.java
- Calculation of the sum of some number of user-entered integers
TestSum.java
- A computation done with a for-loop
TestMulTable.java
- Using nested for-loops to print a multiplication table
TestBreak.java
- Illustration of
break
statement, in a loop
TestContinue.java
- Illustration of
continue
statement
FindSalesAmount.java
- A computation involving a loop, along with if-statements
PrintPyramid.java
- Using nested loops to print a pattern of numbers
PrimeNumber.java
- a program that diplays the first 50 prime numbers