Home > Back-end >  Save the children!
Save the children!

Time:09-15

#include
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 performed

CodePudding user response:

N [I]==1 is over

CodePudding user response:

Should be n [I]==1, otherwise the infinite loop

CodePudding user response:

C + + Builder, 2009, "the if (n=1) [I]" will this written warning,
  • Related