Thank you for the explanation. Our instructor was using it to illustrate the switch-case fall-through, and I wanted a clearer understanding.
Type: Posts; User: Seananigans
Thank you for the explanation. Our instructor was using it to illustrate the switch-case fall-through, and I wanted a clearer understanding.
DO-WHILE
do
{
statements;
}while (condition);
As the while loop, it can be counter-controlled or sentinel- controlled.
The body of the loop continues to execute as long as the condition is...
Hello all,
I need help comprehending a fall-thru switch that would increment 20-40 using even numbers, and how to catch the odd numbers using the option in the switch.
Here is my code:
...
Hello all,
I need help comprehending a fall-thru switch and how to catch the odd numbers using the option in the switch.
Here is my code:
public class HolstienSFallThruSwitch
{
sentinel-controlled do/while loop within a for statement
for(int c = 1; c <= teamName; c++)
{
do
{
System.out.printf("\nWhat is the name of team no. %d?", c );
...