Int main ()
{
Int I=0, m=0, sum=0;
Int n [1000].
Do
{
i++;
Printf (" please input an employee wages \ n ");
The scanf (" % d ", & amp; N [I]);
If (n=1) [I]
{
Printf (" input end \ n ");
i--;
}
The else
{
Sum=sum + n [I];
}
} while (n [I]!=1);
M=sum/I;
Printf (" average wage is: % d \ n ", m);
Printf (" the number is: % d \ n ", I);
return 0;
}
CodePudding user response:
Circulation would have been performedCodePudding user response:
N [I]==1 is overCodePudding user response:
Should be n [I]==1, otherwise the infinite loopCodePudding user response:
C + + Builder, 2009, "the if (n=1) [I]" will this written warning,