Mind boggling card trick: Difference between revisions

No edit summary
Line 877:
redpile=c(redpile,blackbunch)
blackpile=c(blackpile,redbunch)
cat("After the swap the state of the piles is:","\n","Black pile:",blackpile,"\n","Red pile:",redpile,"\n","\n")
"Black pile:",blackpile,"\n","Red pile:",redpile,"\n","\n")
cat("There are ", length(which(blackpile=="B")), " black cards in the black pile.","\n",
"There are ", length(which(redpile=="R")), " red cards in the red pile.","\n",sep="")