Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that prints a tic - tac - toe board. Each square is to be 7 times 7 , with # marks.

Write a program 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

ISBN: 1844804526, 978-1844804528

More Books

Students also viewed these Databases questions