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; cout << "$$$$$" << endl; cout << "&&&&&" << endl;
}
}
```

Computer Science & Information Technology

You might also like to view...

A(n) _________ is a tool hackers use to record your keystrokes.

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

Computer Science & Information Technology

To write fixed-length records, use file open mode:

a. ios::app b. ios::ate c. ios::trunc d. ios::binary

Computer Science & Information Technology

Describe a dynamic disk.

What will be an ideal response?

Computer Science & Information Technology

Although older browsers don't recognizeemailor other moderntypevalues, all browsers default to a value ofblank if no other recognized value is specified. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology