answersLogoWhite

0

#include<stdio.h>

#define size 100

int main(){

int x[size], sum=0;

float average;

for(int i=0;i<size;i++){

scanf("%d",x[i]);

sum+=x[i];

}

average=sum/size;

printf("The Average is :\t%d",average);

return 0;

}

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
JudyJudy
Simplicity is my specialty.
Chat with Judy

Add your answer:

Earn +20 pts
Q: How do you write macro programs to calculate average of n numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp