#include #include void main( { float avg,sum=0; int i,n,a; printf("Enter n no. values: "); scanf("%d",&n); printf("\nEnter marks"); for(i=1;i<=n;i++) { scanf("%d",&a); sum=sum+a; } avg=sum/n; printf("\naverage marks=%.1f",avg); getch(); }
Post a Comment
No comments:
Post a Comment