版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xh_xinhua/article/details/53366502
检测输入的字符是否为“g”
#include <stdio.h>
int main(void)
{
printf("input a char\n");
do{
printf("%s.%d you come here , input g \n", __FUNCTION__, __LINE__);
if (getchar() == 'g')
{
break;
}
}while(1);
return 0;//最后返回成功,哈哈哈!
}