Question: Using your knowledge of Java, do the following: Construct a program that does the following: Display your name and the assignment number using println(). Prompt

Using your knowledge of Java, do the following:

  1. Construct a program that does the following:
    1. Display your name and the assignment number using println().
    2. Prompt the user and read in four integers (i1, i2, i3, i4) (use print()
    3. Displays the four integers to the screen (use println())
    4. Using the entered values, display the following results:
    5. i1 + i2 + i3 + i4
    6. i1 * i2 - i3 * i4
    7. i1 * (i2 + i3) * i4
    8. (i1 + i2 + i3 + i4) % i1
    9. Output the lesser of i1 and i2 using printf.
    10. Output the greater of i1+i2 and i3*i4 using printf.
    11. Determine if i1 is a multiple of i2, i3, or i4. Display the determination results (Hint: use the Remainder (%) operator).
  2. Set a breakpoint after the four integers have been entered and determine the values using the variable/watch window.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!