Question: Problem 1 : Setup Write a C program called scrabble, which reads in a list of words and their location on the board, places them
Problem : Setup
Write a C program called scrabble, which reads in a list of words and their location on the board, places
them to the board, and then displays the board.
Input
Your program will read its input from stdin. The remainder of the input consists of several lines:
The first line contains a single integer N denoting the size of the board N N
The second line contains a second integer W denoting the number of words to place.
This is followed by W lines, each containing the location XY direction D and the word S
X Y D S
where
X is an integer in the range X N denoting the X coordinate of the first letter of the word
Y is an integer in the range Y N denoting the Y coordinate of the first letter of the word
D is either H or V denoting the direction of the word. H for horizontal left to right and V for
vertical top to bottom
S is a single lowercase word which will be one or more letters.
Finally, there is another integer F which for this problem will always be
All words will be in lowercase letters. Hint: Use scanf to read the input See example below.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
