Question: public class expressions { public static void main ( String [ ] arg ) { / * * Make three copies of the following statement

public class expressions {
public static void main(String[] arg)
{
/*
* Make three copies of the following statement and change
* each copy as follows.
*1. Change the first copy so that it prints the value 10.
*2. Change the second copy so that it prints the value 14.
*3. Change the third copy so that it prints the value -25.
*
* Hint: You may not change the numerical values, however, you can change the order of operations by adding parentheses
* in the correct places. Make sure you change the string to
* match the expression.
*/
System.out.println("9+8-7*6/5%4="+
(9+8-7*6/5%4));

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!