#include <
stdio.h>
#include <conio.h>
int main(void)
{
int c;
int a;
a = getchar();
printf ("%c",a);
while ((c = getchar()) != '\n')
{
printf("%c",c);
}
getchar();
return 0;
}
/*getchar()-Note that getchar reads from stdin and is line buffered; this means it will not return until you press ENTER. */
注:可以利用getchar()函数让
程序调试运行结束后等待编程者按下键盘才返回编辑界面,用法:在
主函数结尾,return 0;之前加上getchar();即可