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:
- Construct a program that does the following:
- Display your name and the assignment number using println().
- Prompt the user and read in four integers (i1, i2, i3, i4) (use print()
- Displays the four integers to the screen (use println())
- Using the entered values, display the following results:
- i1 + i2 + i3 + i4
- i1 * i2 - i3 * i4
- i1 * (i2 + i3) * i4
- (i1 + i2 + i3 + i4) % i1
- Output the lesser of i1 and i2 using printf.
- Output the greater of i1+i2 and i3*i4 using printf.
- Determine if i1 is a multiple of i2, i3, or i4. Display the determination results (Hint: use the Remainder (%) operator).
- 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
