subject
Computers and Technology, 28.11.2020 08:40 daisa02

Write a program that asks the user to enter 2 words, then prints "Great!" if the two words are identical, "Close enough" if they are the same length and all but the last letter matches, and "Try again" otherwise. Sample runs:

Enter 2 strings:
the
the
Great!
Enter 2 strings:
that
than
Close enough
Enter 2 strings:
their
there
Try again
Hint - for the "Close enough" condition you will need to see whether substrings of the two input String are the same. You can use the length and substring methods together to get the relevant substrings (all but the last character of each String).

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 10:10
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
Answers: 1
You know the right answer?
Write a program that asks the user to enter 2 words, then prints "Great!" if the two words are ident...
Questions
question
Biology, 28.08.2019 03:50
question
Geography, 28.08.2019 03:50