At Westonci.ca, we connect you with the answers you need, thanks to our active and informed community. Connect with a community of experts ready to provide precise solutions to your questions quickly and accurately. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

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