Mind boggling card trick: Difference between revisions
m
Corrected spelling mistakes.
m (→{{header|Julia}}: Added forgotten import of the Random library) |
m (Corrected spelling mistakes.) |
||
Line 954:
System.out.println(System.lineSeparator() + "Number of cards are to be swapped: " + choice);
System.out.println("The respective zero-based indices of the cards to be swapped are:");
System.out.println(" Red
System.out.println(" Black
for ( int i = 0; i < choice; i++ ) {
Line 963:
}
System.out.println(System.lineSeparator() + "After swapping cards the state of the red and black
System.out.println(" Red
System.out.println(" Black
int redCount = 0;
Line 984:
System.out.println("The number of black cards in the black pile: " + blackCount);
if ( redCount == blackCount ) {
System.out.println("So the
} else {
System.out.println("So the
}
}
Line 1,003:
Number of cards are to be swapped: 6
The respective zero-based indices of the cards to be swapped are:
Red
Black
After swapping cards the state of the red and black
Red
Black
The number of red cards in the red pile: 8
The number of black cards in the black pile: 8
So the
</pre>
|