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 = 8, the following output is produced.
```
@@@@@
$$$$$
&&&&&
```


```
if (y == 8) {
if (x == 5) {
cout << "@@@@@" << endl;
}
else {
cout << "#####" << endl;
}
```

Computer Science & Information Technology

You might also like to view...

In an array-based implementation of a queue, what purpose is served by treating the array as circular? Is it required in order to have an array-based implementation of a queue?

What will be an ideal response?

Computer Science & Information Technology

All of the formatting options found in the Page Setup dialog box are also available on the Ribbon

Indicate whether the statement is true or false

Computer Science & Information Technology

An element of the Excel window that displays the name of the selected cell, table, chart, or object is the:

What will be an ideal response?

Computer Science & Information Technology

In a business letter, the ____________________, which consists of the month, day, and year, is positioned two to six lines below the letterhead.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology