Assignment #20

Instructions

  1. Write a Java program using for loops that does the following:
    1. In the main() method, complete Exercises 1, 2, 3, 4, and 5 from the lecture slides.
  2. Don't forget to include Java documentation (javadoc) comments in your program. See the Java Coding Standard for details.
  3. See the syllabus for the Assignment Grading Guidelines for your program assignments.

Example Input and Output (I/O)

11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
-20, -16, -12, -8, -4, 0, 4, 8, 12, 16, 20, 
20, 16, 12, 8, 4, 0, -4, -8, -12, -16, -20, 
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 
Enter a sentence: No rain, no rainbows!
Backwards is:     !swobniar on ,niar oN

Example Input and Output (I/O) II

11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 
-20, -16, -12, -8, -4, 0, 4, 8, 12, 16, 20, 
20, 16, 12, 8, 4, 0, -4, -8, -12, -16, -20, 
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 
Enter a sentence: No matter where you go, there you are.
Backwards is:     .era uoy ereht ,og uoy erehw rettam oN

Click to validate the HTML code

Click to validate the CSS code