#include<stdio.h>
#include<conio.h>
void main()
{
int data[20],sum=0,cho,ave,i;
clrscr();
printf("How Many Numebrs Do You Want Enter ");
scanf("%d",&cho);
for(i=1;i<=cho;i++)
{
printf("Enter Any Numebr for Data[%d] ",i);
scanf("%d",&data[i]);
sum=sum+data[i];
}
printf("\n\n\tThe Sum of %d Numbers is: %d",cho,sum);
ave=sum/cho;
printf("\n\tThe Average of %d Numbers is: %d",cho,ave);
getch();
}
------------------------------------------------------------------------------------
Input: cho=5,data[1]=1,data[2]=2,data[3]=3,data[4]=4,data[5]=5
Output: The Sum of 5 Numbers is 15
The Average of 5 Numbers is 3