OneCompiler

i want this code

First, user is asked to enter number of letters allowed to make word e.g., n
Then user will be prompted to enter n different letters along with score (1-9) assigned to each letter.
User will construct one word out of these letters. Each valid word receives a score.
Score for a word is the sum of the points for letters in the word, plus 50 points if all n letters are used on
the first go.
Program must have following checks:
Number of allowed letters should not exceed 15 and should not be less than 3.
Score assigned to each letter should not be negative or zero and should be less than 10.
Program should display zero score if word constructed by user has any letter other than allowed list.
User should be asked if he/she wants to play game again.
If user enters a number in place of allowed letter loop should immediately terminate with the message
“invalid letter

1 Answer

4 years ago by

Is there a programming language requirement?

4 years ago by Dom