Complete
C++
program to carry out the following tasks. Initially stored 10 numbers, read in a number from user to replace the last number in those 10 numbers, then print the average of the values above average Ex: values:
9.5,8.5,10,5,2,7,6,3,2.2,0
User input:
1.6
to replace 0 , avg
=5.48
, values above avg:
9.5,8.5,10,7,6
output, average of the values above average:
8.2
\#include using namespace std: int
main( x
^
double
a[10]={9.5,8.5,10,5,2,7,6,3,2.2,0}
, sum cout
<<
"please enter a number: ";
cin>
for
10;i++){
\} double avg
=
sum int count
=0
; for (inti
K
if (a[i]
){
sum \} \} cout
≮<
"Average of the values above average: "
<
<<
endl; return 0;