Ask Question

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. 4 October, 00:24
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers