Home > Back-end >  Programming: 20 integer from the keyboard input, and its average and output all the elements to be a
Programming: 20 integer from the keyboard input, and its average and output all the elements to be a

Time:09-15

Programming: 20 integer from the keyboard input, and its average output and average above all elements of the

The bosses can help kangkang write to? (a) an small white

CodePudding user response:

Quite right,

CodePudding user response:

Another friend is pointed out that division \ and Max can need not define?? Thank you for you??

CodePudding user response:

Another friend is pointed out that division \ and Max can need not define?? Thank you for you!

CodePudding user response:

 # include & lt; stdio.h> 
20 # define N
Int main ()
{
Int a [N], I, s;//-- -- -- -- -- -- -- an array of a statement to a [N] -
S=0;
Float k;//-- -- -- -- -- -- -- average k type to float -- -- -- -- -- -- -- --
Printf (" please enter the Numbers: % d ", N);
for (i=0; i {
The scanf (" % d ", & amp; A [I]);
S=s + a, [I].
}
K=(float) s/N.//-- -- -- -- -- -- -- -- modification for the method of average -- -- -- -- -- -- --
Printf (" averages in % f \ n ", k);
Printf (" more than average are: ");
for (i=0; i {
If (a [I] & gt; K)
{
Printf (" % d ", a [I]);
}
}
return 0;
}

VS2015 c + + environment debugging (input only five Numbers)

CodePudding user response:

Handwritten code is very good

CodePudding user response:

I and my last stubborn,,,,, & gt; _ & lt; : : helpless

CodePudding user response:

Thank you thank you! Look on...
  • Related