孤云的博客根据scanf()的返回值判断scanf()是否成功读入了指定的数据项数,使程序在用户输入123a时,能输出如下运行结果: int main(){ int a,b; int x = scanf("%d %d",&a,&b); if(x == 2){ printf("a = %d, b ...
编程爱好者ph的博客根据scanf()的返回值判断scanf()是否成功读入了指定的数据项数,使程序在用户输入123a时,能输出如下运行结果: 123a↙ Input error! #include <stdio.h> int main() { int a, b; if (scanf("%d %d", &...