我试图让我的程序仅在用户输入 Y 或 y 时运行,但它只运行一次,即使它不是 Y 或 y。输入将是 Y、y、N 或 n
printf("Welcome to the Jumble Puzzle Solver!\n\n");
printf("Would you like to enter a jumbled word?\n");
scanf("%s", &answer);
do{
printf("What word would you like scored?\n");
scanf("%s", &letters);
strcpy(changeletters, letters);
recursivepermute(letters, changeletters, checkword, k, dictionary ,max, min);
printf("Would you like to enter a jumbled word?\n");
scanf("%s", &answer);
}while (answer == 'Y' || answer == 'y');