Anonymous user
Rock-paper-scissors: Difference between revisions
m
→{{header|C}}: small style change
m (→{{header|C}}: minor comment) |
m (→{{header|C}}: small style change) |
||
Line 194:
char *names[] = { "Rock", "Paper", "Scissors" };
char str[2];
char *winner[] = { "We tied.", "Meself winned.", "You win." };
while (1) {
Line 213:
continue;
}
switch ((my_action - user_action + 3) % 3) {▼
printf("You chose %s; I chose %s. %s\n",
names[user_action], names[my_action],
user_rec[user_action]
}
}</lang>
|