Ask Question
5 March, 03:42

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:

+1
Answers (1)
  1. 5 March, 05:20
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers