Help me solve this problem, dont worry, im just starting out so its all very basic...and easy to you guys, i would imagine.
Two strings X and Y are said to be conjugates if, by shifting the symbols of Y in a cyclic fashion zero or more times, you can arrive at X. For example, the strings ababba and abbaab are conjugates because by shifting the symbols of the latter two positions to the right ( or, equivalently, four positions to the left), you arrive at the former. On the other hand, ababba and abaabb are not conjugates, as you can easily verify. It is clear from the definition that two strings cannot be conjugates unless they have the same length.
You are to develop a program that prompts the user to enter two strings (the maximum length for a string is 20 characters) and that by reporting whether the two are conjugates. The program terminates when the user enters the empty string.
Sample Program Execution
Enter 1st string: ababba
Enter 2nd string: abbaab
The two strings are conjugates.Enter 1st string: ababba
Enter 2nd string: abaabb
The two strings are NOT conjugates.Enter 1st string: