# include <stdio.h>
# include <stdlib.h>
# include <string.h>
main()
{
char name[20];
printf("Input a name:");
gets(name);
printf("The name input was: %s\n", name);
getch();
}
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
int main(void)
{
char name[20];
printf("Input a name:");
gets(name);
printf("The name input was: %s\n", name);
system("pause");
}
你这般的书写也能编译通过.我想你用的是tc.
入口函数请按这种格式书写 int main(void)