Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need help coding user interface to enter words: Search the board for the first letter of the word entered, and then recursively search around the
Need help coding user interface to enter words: Search the board for the first letter of the word entered, and then recursively search around the found letter for the remaining letters of the word.
This is my grid:
# include# include # include int x; int y; char grid [10] [10]; int z; int j; int main() { // declare array with alphabet char alphabet[26] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; printf ("Insert the width (x) and height (y) of the grid "); scanf ("%d %d", &x, &y); for (z = 0; z < x; z++) { for (j=0; j < y; j++) { // print letters instead of dots grid [z] [j] = alphabet[rand() % 26]; } } for (z = 0; z < x; z++) { for (j=0; j < y; j++) { printf ("%c", grid [z] [j]); } printf (" "); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started