What does the following program print?

```
// What does this program print?
#include
using namespace std;

int main()
{
int row = 10; // initialize row
int column; // declare column

while ( row >= 1 ) // loop until row < 1
{
column = 1; // set column to 1 as iteration begins

while ( column <= 10 ) // loop 10 times
{
cout << ( row % 2 ? "<" : ">" ); // output
++column; // increment column
} // end inner while

--row; // decrement row
cout << endl; // begin new output line
} // end outer while
} // end main
```

What will be an ideal response?

>>>>>>>>>>
<<<<<<<<<<
>>>>>>>>>>
<<<<<<<<<<
>>>>>>>>>>
<<<<<<<<<<
>>>>>>>>>>
<<<<<<<<<<
>>>>>>>>>>
<<<<<<<<<<

Computer Science & Information Technology

You might also like to view...

The ________ function changes the case of the characters in a string, making all characters uppercase

A) LEFT B) UPPER C) LOWER D) MID

Computer Science & Information Technology

To remove a leaf in a binary search tree, what must be done?

a. set the pointer in the leaf’s parent to nullptr b. set the pointer in the leaf to nullptr c. set the pointer in the root to nullptr d. delete the data from the leaf

Computer Science & Information Technology