asked 216k views
1 vote
Today you are tgwrite a Java program that will prompt for and read two numeronyms (a number-based word) greater than two digits and of equal length and an even length each, entered by the user, and create a new word starting with the character [ and which contains the last digit of the left half of the 2 st numeronym, the last digit of the first half of 1 st numeronym, followed by the character *, followed by the second to the last digit of the left half of the 2 ndnumeronym, followed by the second to the last digit of first half of the 1 st numeronym, followed by the character *, up to the first digit of each numeronym, i.e. you are going only through first left part of each numeronym from right to left, starting from the 2 nd word; and ending the word with the character ] Be sure to use the same format and wording as in the sample runs in the table below. You can use the loop of your choice to solve the problem. You are not allowed to use arrays. Note that in the output o symbol is a space and 4 is a new line character. All words except for user input (in Bleu) must be exactly as indicated in the sample outputs. Any extra "spaces" and/or "new lines" will be graded a wrong

1 Answer

1 vote

Final answer:

The task involves writing a Java program that takes two even-length numeronyms, processes them according to certain rules, and outputs a newly formed word using digits from the numeronyms with loops.

Step-by-step explanation:

The question asked involves writing a Java program. The program is supposed to take two numeronyms created by the user, process them according to specific rules, and then output a new sequence of characters forming a new word. The numeronyms must be greater than two digits, of equal length, and an even length each. The new sequence will use digits from the two numeronyms, by pairing last digits of the first halves in reverse order, separating them with an asterisk, and framing the sequence within square brackets.

The process requires understanding string manipulation without using arrays. Loops are utilized to iterate through the characters of the entered numeronyms from right to left, and string concatenation or a StringBuilder can be used to form the final word.

answered
User Calloway
by
8.0k points

No related questions found