while语句
while(1), break 语句想要暂停一下但是使用system("pause")不管用,每次都是得出结论后直接退出程序了,这样的话应该怎么做呢?如下图while (1)
{
printf("A enter:");
sacnf_s("%d", &t);
i++;
if (t == n)
{
printf("Congratulations playerA is right, he or she spent %d times to guess the correct answer", i);
system("pause"); 此处system("pause")不管用 ,加至break 后仍然直接跳出
break;
}
else if (t>n)
printf("This character is too high\n.");
else
printf("This character is too low\n.");
system("pause");
system("cls");
[此贴子已经被作者于2016-10-18 22:06编辑过]