Based on the dangling-else discussion , modify the following code to produce the output shown. Use proper indentation techniques. You must not make any additional changes other than inserting braces. We eliminated the indentation from the following code to make the problem more challenging
```
if (y == 8)
if (x == 5)
cout << "@@@@@" << endl;
else
cout << "#####" << endl;
cout << "$$$$$" << endl;
cout << "&&&&&" << endl;
```
Assuming x = 5 and y = 7, the following output is produced. [Note: The last three out- put statements after the else are all part of a block.]
```
#####
$$$$$
&&&&&
```
```
if (y == 8) {
if (x == 5) {
cout << "@@@@@" << endl;
}
}
else {
cout << "#####" << endl;
cout << "$$$$$" << endl;
cout << "&&&&&" << endl;
}
```
You might also like to view...
Answer the following questions true (T) or false (F)
1. True/False: In order to swap the values of two variables, it is necessary to use a third variable as a temporary holding location. 2. True/False: A binary search looks for a desired item by comparing the search item to each data item in order, from first to last, until a match is found. 3. True/False: The binary search requires that the array of data to be searched is in numerical or alphabetical order.
All content should fit in the column ____.
A. height B. dimension C. width D. both a and c
With ____, you make a request to a method without knowing the details of how the method works.
A. implementation masking B. method masking C. method hiding D. implementation hiding
What is the basic structure of a trigger?
What will be an ideal response?