(字符中如果含有x,就会退出,否则循环)
#include <stdio.h>
main()
{
int c;
int count=0;
c=getchar();
while(c!='x') /* 如果是 EOF 就是死循环 */
{
putchar(c);
c=getchar();
count++;
printf("\nthis is the end of round %d\n",count);
}
}
[ Last edited by GOTOmsdos on 2005-10-31 at 16:29 ]作者: LanE 时间: 2005-11-4 11:28
Quote:
Originally posted by lujiayi3 at 2005-10-27 04:22 PM:
MAIN()
{
int c;