Question
USING JAVA!!!! You will be creating an algorithm that manages a number of input words based on user preference and keeps track of the number
USING JAVA!!!!
You will be creating an algorithm that manages a number of input words based on user preference and keeps track of the number of odd length words vs. the number of even length words. First, ask the user how many words they would like to enter. Next use a for loop to iterate the user specified number of times and in each iteration, request which new word from the user. Print each word the user types surrounded by quote marks, and whether its length is even or odd. Keep track of the number of even and odd lengths of the words the user types, and print Doneafter all words are entered (so the user wont try to type another). Finally, print out the number of even and odd length words that were entered with appropriate labels.
Eg.
How many words would you like to enter? 3 Enter word 1: Rockhurst "Rockhurst" has an odd length. Enter word 2: University
"University" has an even length. Enter word 3: Rocks "Rocks" has an odd length. Done.
You entered 1 even length word. You entered 2 odd length words.
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