Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MySQL/PHP Database Applications

Authors: Brad Bulger, Jay Greenspan, David Wall

2nd Edition

0764549634, 9780764549632

More Books

Students also viewed these Databases questions