Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (20 points) Implement a program that requests three strings from the user. Your program should concatenate the first two strings (stra + strb)

1. (20 points) Implement a program that requests three strings from the user. Your program should concatenate the first two strings (stra + strb) and compare the concatenated string with the third string (strc). If they are equal, your program should print, "The two strings are equal in the forward order", otherwise, the program should concatenate the two strings in the reverse order (strb + stra) and compare it with the third string and print, "The strings are equal in the reverse order". If this second test also fails, your program should print, "The two strings are not equal". Partial sample runs are shown below: Enter first string: Drop Enter second string: box Enter third string: Dropbox The two strings are equal in the forward order Enter first string: 113 Enter second string: box Enter third string: box113 The two strings are equal in the reverse order

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java Programming

Authors: Joyce Farrell

9th edition

1337397075, 978-1337397070

More Books

Students also viewed these Programming questions