Question: Write a program that prints the following grid to play tic-tac-toe. You should do it the smart way, though. Declare string variables to hold two
Write a program that prints the following grid to play tic-tac-toe.

You should do it the smart way, though. Declare string variables to hold two kinds of patterns: a comb-shaped pattern and the bottom line. Print the comb three times and the bottom line once.
| | | | +--+--+--+ +-+-+-+ Of course, you could simply write seven statements of the form System.out.println("+--+--+--+");
Step by Step Solution
3.25 Rating (146 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
