### Program 281: Print Average of Numbers in Array at Even Positions

Program 281: Print Average of Numbers in Array at Even Positions

```#include<stdio.h>
main()
{
int i,a[100],num,sum=0,count=0;
float avg;
printf("Enter Number of elements you want\n");
scanf("%d",&num);
printf("Enter Elements in the array\n");
for(i=0;i<num;i++)
{
scanf("%d",&a[i]);
if((i+1)%2==0)
{
sum+=a[i];
count++;
}
}

avg=(float)(sum/count);
printf("Average of Sum of  numbers at even positions is %f\n",avg);
}```
Explanation:

//Coming Soon

Output:

#### 1 comment:

1. college-party-guide One of the most important rituals for students in college is to throw the most memorable student dorm celebration.
factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.
gigolo The term”gigolo” usually refers to the person who lives an arranged lifestyle that includes many of these relationships in a series, rather than having any other support system.