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, 21.06.2019 14:20
Once starbucks had established its presence in thousands of cities internationally, the company sought to increase the number of purchases by existing customers with a strategy that led to new in-store merchandise, including compilation cds and high-speed wireless access.
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
question
Computers and Technology, 24.06.2019 00:40
What is the error in the following pseudocode? module main() call raisetopower(2, 1.5) end module module raisetopower(real value, integer power) declare real result set result = value^power display result end module
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
Mathematics, 26.06.2019 08:50
Questions on the website: 13722367