C语言基础
#include #include "genlib.h"
//#include
#include "simpio.h"
bool GetYesOrNo(string answer);
void PlayOneGame(void);
bool GetYesOrNo(string ans)
{
while (1) {
ans = GetLine();
if (StringEqual(ans,"yes")) {
return TRUE; }
else if(StringEqual(ans,"no")) {
return FALSE; }
else{
printf("Please answer yes or no.\n");
}
}
}
int main()
{
while (1) {
printf("...play the game...\n");
if(!GetYesOrNo("Would you like to play again? "))break;
}
return 0;
}
这个Would you like to play again句子显示不出来,哪里有问题?