Question: please write a code in java 3. Consider the following code snippet (code indentation has been intentionally removed): if (Y == 8) if (x ==
3. Consider the following code snippet (code indentation has been intentionally removed): if (Y == 8) if (x == 5) System.out.println("@@@@@" ); else System.out.println( "#####" ); System.out.println("$$$$$" ); System.out.println("&&&&&" ); a. Modify the above code so that its output for x = 5 and y = 8 is as follows: @@@@@ SSSSS &&&&& Note that the only action allowed to change the first code is to add { and ). After making the necessary changes, indent the resulting code. b. Modify the above code so that its output for x = 5 and y = 8 is as follows: @@@@@ c. Modify the above code so that its output for x = 5 and y = 7 is as follows: SSS$$ &&&&&
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
