write a program in which the user prints a three-letter word in small letters and find if it can be found in the following 2D array: cut aao rsp • If the inserted word is longer or shorter than three letters, then the code will preview the message "Wrong entry" as an output. • If the word has a match in the array, "Match" will be printed out. • If the word does not match any of the word in the array then "No match" will be printed out. • The inserted word can be matched with a row when read from left to right or right to left, with one from the columns when read from top to down or down to top, or even with the diagonals of the array when read in any direction. For example: The word 'top' can be found in column 2 and the word 'cap' can be found in the left to right diagonal. IMPORTANT NOTE • Do not add any cout statements except for the final answer as specified above. • Do not add "Enter a number", "the number of digits is" or any similar prompts. • Also note that the automatic grader is case-sensitive; so "error" is wrong but "ERROR" is correct. • Do not add any unnecessary spaces inside the strings of cout statements" ". • You may add any libraries needed.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
write a program in which the user prints a three-letter word in small letters and find if it can be found in the following 2D array:
cut
aao
rsp
• If the inserted word is longer or shorter than three letters, then the code will preview the message "Wrong entry" as an output.
• If the word has a match in the array, "Match" will be printed out.
• If the word does not match any of the word in the array then "No match" will be printed out.
• The inserted word can be matched with a row when read from left to right or right to left, with one from the columns when read from
top to down or down to top, or even with the diagonals of the array when read in any direction. For example: The word 'top' can be
found in column 2 and the word 'cap' can be found in the left to right diagonal.
IMPORTANT NOTE
Do not add any cout statements except for the final answer as specified above.
• Do not add "Enter a number", "the number of digits is" or any similar prompts.
• Also note that the automatic grader is case-sensitive; so "error" is wrong but "ERROR" is correct.
• Do not add any unnecessary spaces inside the strings of cout statements "".
• You may add any libraries needed.
Transcribed Image Text:write a program in which the user prints a three-letter word in small letters and find if it can be found in the following 2D array: cut aao rsp • If the inserted word is longer or shorter than three letters, then the code will preview the message "Wrong entry" as an output. • If the word has a match in the array, "Match" will be printed out. • If the word does not match any of the word in the array then "No match" will be printed out. • The inserted word can be matched with a row when read from left to right or right to left, with one from the columns when read from top to down or down to top, or even with the diagonals of the array when read in any direction. For example: The word 'top' can be found in column 2 and the word 'cap' can be found in the left to right diagonal. IMPORTANT NOTE Do not add any cout statements except for the final answer as specified above. • Do not add "Enter a number", "the number of digits is" or any similar prompts. • Also note that the automatic grader is case-sensitive; so "error" is wrong but "ERROR" is correct. • Do not add any unnecessary spaces inside the strings of cout statements "". • You may add any libraries needed.
1/0
Program Input:
A three-letter word
Program Output:
A "Match", "No Match", or "Wrong entry" output line
Sample Testcase 0:
Input:
dog
Output:
No match
Transcribed Image Text:1/0 Program Input: A three-letter word Program Output: A "Match", "No Match", or "Wrong entry" output line Sample Testcase 0: Input: dog Output: No match
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY