Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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