CodePudding user response:
Reference:# include
Int main ()
{
Int n, CNT=0, sum=0;
While (1) {
The scanf (" % d ", & amp; n);
If (n & lt;=0) break;
{if (n % 2==0)
Cnt++;
The sum +=n;
}
}
Printf (" CNT=% d, the sum=% d \ n ", CNT, sum);
return 0;
}
CodePudding user response:
This should be a very basic question, it is recommended that the original poster is more at ordinary times, reading more, at least your online search tone can also be improved? while (the scanf (" % d ", & amp; N)==1 & amp; & N & gt; 0 {
If (n % 2)
continue;
Cnt++;
The sum +=n;
} Make some changes, break into the continue, more than one way
CodePudding user response:
I don't liquid, follow to learn