Write a basic program to calculate the average of six number
Answers
Answered by
1
Answer:
#include<stdio.h>
void main()
{
int a,b,c,d,e,f,sum=0,avg=0;
printf("enter the numbers");
scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
sum=a+b+c+d+e+f;
avg=sum/6;
printf("the average of six number=%d",avg);
}
Explanation:
Similar questions