This is a simplified snap card game, I don't need to have the program do anything but to tell me if the value of the card matches with the last set, but it seems to go into a infinite loop, can anyone please tell me which part went wrong? I looked many places and couldn't find an answer to it. Please and many thanks.
Code:
#include <stdio.h>
char o, n, s;
int main() {
printf("input your cards. eg. 3D as 3 of Diamonds.\n");
scanf("%c%c", &n, &s);
while(n!=o) {
o=n;
scanf("%c%c", &n, &s);
}
printf("SNAP\n");
}