Question: Write a program in C that prints a tic - tac - toe board. Each square is to be 7 times 7 , with

Write a program in C that prints a tic-tac-toe board. Each square is to be 7\times 7, with # marks. The X is to be 5\times 5, composed of Xs, and placed in a square the coordinates of which are given as input.
Your program first prompts for, and reads, two integers separated by blanks or tabs between 1 and 3 inclusive; if either is not, print an error message giving both numbers and stating it is not a valid square and prompt for two numbers again. If you encounter an end-of-file, end the program. For example:
>24
2,4 is not a valid square; the numbers must be between 1 and 3 inclusive
>2,4
Illegal character in input ","
>
The upper left square has co-ordinates (1,1) and the lower right corner has coordinates (3,3).
On exit, your program returns 0.(25 points) Write a program that prints a tic-tac-toe board. Each square is to be 77, with " # " marks. The "x" is to be 55, composed of "x"s, and placed in a square the coordinates of which are given as input.
Your program first prompts for, and reads, two integers separated by blanks or tabs between 1 and 3 inclusive; if either is not, print an error message giving both numbers and stating it is not a valid square and prompt
for two numbers again. If you encounter an end-of-file, end the program. For example:
The upper left square has co-ordinates (1,1) and the lower right corner has coordinates (3,3).
On exit, your program returns 0.
Here is an example input and output; the input is in red and the output in black. Write a program that prints a tic-tac-toe board. Each square is to be 77, with " # " marks. The "x" is to be 55, composed of "x"s, and placed in a square the coordinates of which are given as input.
Your program first prompts for, and reads, two integers separated by blanks or tabs between 1 and 3 inclusive; if either is not, print an error message giving both numbers and stating it is not a valid square and prompt
for two numbers again. If you encounter an end-of-file, end the program. For example:
The upper left square has co-ordinates (1,1) and the lower right corner has coordinates (3,3).
On exit, your program returns 0.
Here is an example input and output; the input is in red and the output in black.
 Write a program in C that prints a tic-tac-toe board. Each

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!