总是提示else without a previous if
#include <stdio.h>int main()
{
int a = 0, b = 0;
printf("input two numbers:");
while(scanf("%d%d",&a,&b)!=EOF)
if(a != 0) b != 0;
printf("%d\n", a + b);
else
;
return 0;
}
顺便我是想如果输入两个0的话就什么都不输出,小弟畜舍C语言,求解答
#include <stdio.h> int main() { int a = 0, b = 0; printf("input two numbers:"); while(scanf("%d%d",&a,&b)!=EOF) if(a != 0) b != 0; printf("%d\n", a + b); else ; return 0; }