Create a method that counts from 1-10 using each of the
while
, do...while
, and for
statements.
Create a program that evaluates whether a given input is odd
or even; a multiple of 10, or too large (over 100) by using four
levels of if
statement. Then
expand the program to do the same work with a switch
statement.
Create a program that initializes a variable i
at 0 and counts up, and initializes a
second variable j
at 25 and
counts down. Use a for
loop to
increment i
and decrement
j
simultaneously. When i
is greater than j
, end the loop and print out the
message “Crossed over!”