Write A programme in qbasic to take the salaries from 10 employees and find average emplyoee salarie
Answers
Answered by
2
Answer:
Explanation:
#include <stdio.h>
void main()
{
int i,n,sum=0;
float avg;
printf("Input the salaries from 10 employees : \n");
for (i=1;i<=10;i++)
{
printf("salaries from employees %d :",i);
scanf("%d",&n);
sum +=n;
}
avg=sum/10.0;
printf("The Average is : %f\n",avg);
}
Similar questions