Question: The examples below show the output of a program that displays any number of Os running diagonally from top left to bottom right. Now, write

The examples below show the output of a program that displays any number of Os running diagonally from top left to bottom right. Now, write a program called OppositeDiagonal that prompts the user for a number of lines to display, and then use a recursive method called display() to print Os from top right to bottom left.
Example 1 Example 2
How many lines to display? >>5
O
O
O
O
O
How many lines to display? >>8
O
O
O
O
O
O
O
O
An example of the program is shown below:
How many lines to display? >>10
O
O
O
O
O
O
O
O
O
O

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!