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...
Document ________ are nonprinting vertical and horizontal lines that assist in aligning graphics and elements
A) tabs B) lines C) gridlines D) markers
________________ is an application installer and configuration service that Microsoft has provided with Windows versions dating back to Windows XP and Windows Server 2003 . It enables you to install, configure, update, and patch applications efficiently
a. Windows AppSetup b. Windows Installer c. Compatibility Checker d. WinConfig