关于循环语句,求助
#include<stdio.h>
#include<conio.h>
main()
{
int x;
char i,ans;
i=' ';
do
{
clrscr();
x=0;
ans='y';
printf("enter sequence of character:");
do{
i=getchar();
x++;
}while(i!='\n');
i=' ';
printf("number of characters entered is: %d\n",--x);
printf("more sequences(y/n) ?\n");
ans=getchar();
}while(ans=='Y'|| ans=='y');
}
1.程序运行提示出错 'clrscr' : undeclared identifier,但我已写了#include<conio.h>
2.当输入y后,程序为什么不继续循环,而是输出enter sequence of character:number of characters entered is:0