刚发错了,这个是对的
#include<stdio.h>
int main(void)
{
char c;
printf("input a text end of ctrl+z:\n");
c=getchar();
while((c=getchar())!=EOF);
putchar(c);
return 0;
}
#include<stdio.h>
int main(void)
{
char c;
printf("input a text end of ctrl+z:\n");
c=getchar();
while((c=getchar())!=EOF);
putchar(c);
return 0;
}
2015-08-24
举报