Description: The magician shuffles a small pack of cards, holds it face down and performs the following procedure:
The top card is moved to the bottom of the pack. The new top card is dealt face up onto the table. It is the Ace of Spades.
Two cards are moved one at a time from the top to the bottom. The next card is dealt face up onto the table. It is the Two of Spades.
Three cards are moved one at a time…
This goes on until the nth and last card turns out to be the n of Spades.
This impressive trick works if the magician knows how to arrange the cards beforehand (and knows how to give a false shuffle). Your program has to determine the initial order of the cards for a given number of cards, 1 ≤ n ≤ 13.
To Search:
File list (Check if you may need any files):
3032
....\3032.dsp
....\3032.dsw
....\3032.ncb
....\3032.opt
....\3032.plg
....\Debug
....\.....\3032.exe
....\.....\3032.ilk
....\.....\3032.pch
....\.....\3032.pdb
....\.....\test.obj
....\.....\vc60.idb
....\.....\vc60.pdb
....\test.cpp