Welcome to Westonci.ca, your one-stop destination for finding answers to all your questions. Join our expert community now! Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

Write a program that HARDCODE a word, and then writes out that word once per line but for each line replace the first character of the word with a space and remove the last character of the word. Continue until no characters are left. (You will have to be careful with words having an odd number of characters.)

NOTE: As always, you can use input instead of hardcode.

Enter a word -->ABARACADABARA
ABARACADABARA
BARACADABAR
ARACADABA
RACADAB
ACADA
CAD
A