Fortune Telling Collection - Free divination - Java topic Xiaoming holds two cards in his left and right hands, spades 10 and hearts 8. Now he exchanges the cards in his hand and simulates the process with a program.
Java topic Xiaoming holds two cards in his left and right hands, spades 10 and hearts 8. Now he exchanges the cards in his hand and simulates the process with a program.
To change the card, just: 1. Set an intermediate variable and assign it to the card 10 in the left hand 2. Assign the right hand card 8 to the left hand card 3 10. Assign the card 8 in the intermediate variable to the card 8 in the right hand.
int j = 10; The card in the left hand
int k = 8; The card in the right hand
Start the exchange:
int I = j;
j = k;
k = I;
- Related articles
- How to simulate coin toss experiment with excel
- The eightieth sign, the ancients divided into three countries, only three points, why do you want luxury, people want to go home, just wait for the sun and the moon, what do you mean?
- The white crystal ball broke.
- Black boy 2, where is the three-headed snake glue?
- Are there any good classic time travel novels?
- What are the zodiac signs? From what month to what month?
- Psychological test. Does he love you? Psychological test: Does he really love you?
- Where can I find a Waittarot card in Zhangzhou (now)?
- Fairy-seeking Raiders: An Upgrade Guide for Chivalrous Knight
- What does the German Nazi's "Wan Zi Wen" mean? Is it related to the Buddhist's "Wan Zi Wen"?