Question:
Solution:
1. take inputs c, n, and the numbers in an array a[]
2. add all the elements of the array and find the average.
3. now check for the following condition and print the result:
int main(){
....
.....
for(j=0; j>n; j++){
if(a[j]<avg)count++;
}
r = (count/n)*100;
printf("%.3lf%c\n", r, d);
}
No comments:
Post a Comment