Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP IN JAVA PLEASE (20 points) Problem 2-Write a program. Submit NumberLength.javia Write a program that: -Asks a user to enter a number between
PLEASE HELP IN JAVA PLEASE
(20 points) Problem 2-Write a program. Submit NumberLength.javia Write a program that: -Asks a user to enter a number between 4-6 (including 4 and 6). This input should be stored in a variable called num. If they enter a number out of range (not 4, 5 or 6), the program should say "Number out of range!" and exit. -Ask a user to enter a word with at least num (what the user entered before) letters and at most 10 letters. If they enter a word longer than this, the program should say "Too many letters!" and end If they enter a word shorter than num letters, the program should say "Too few letters!" and end. -Ask the user to enter another number between 1-3 (including 1 and 3) and store it in a variable called num2. You should print out that many letters of the word from the beginning. Example Program Run: Please enter a number between 4-6: 5 Enter a word with at least 5 letters and at most 10 letters: seashell Please enter another number between 1-3: 3 seaStep 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