Ask Question
28 May, 11:47

Complete the printtictactoe function with char parameters horizchar and vertchar that prints a tic-tac-toe board with the characters as follows. end with newline. ex: printtictactoe ('~', '!') prints:

+5
Answers (1)
  1. 28 May, 13:16
    0
    Void printtictactoe (char horizchar, char vertchar)

    {

    int i, j;

    int scale = 5;

    for (j=0; j<3; j++) {

    for (i = 0; i < scale; i++)

    printf ("%*c%*c/n", scale+1, vertchar, scale+1, vertchar);

    if (j < 2)

    for (i = 0; i < (scale * 3) + 2; i++)

    printf ("%c", horizchar);

    printf ("/n");

    }

    }

    I left out many braces because of the layout issues with this website. There is a scale factor you can set to the desired size of the board cells!
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Complete the printtictactoe function with char parameters horizchar and vertchar that prints a tic-tac-toe board with the characters as ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers