I need to do a code that captures a string of random characters and a number, this separates the chain in 2 and then prints out each one, first the last letters of the chain and then the same amount of spaces of the first chain and then the first letters of the initial chain.
example:
write anything: abcd
enter number: 2
cd
ab
but i can't use cycles, i tried to change all the characters from the first printed chain into " " and then insert it to the second chain, but i can't get it to work
First, explain cycles. Are you saying you can't use loops? Or are you saying you're not allowed to use dynamically allocated variable types, such as vectors and dynamic arrays?