Write a program in C to read 10 numbers from the keyboard and find their sum and average

10 numbers from the keyboard and find their sum and average

Write a program in C to read 10 numbers from the keyboard and find their sum and average Solution in C: #include<stdio.h> void main() { int i,n,sum=0 ;double aver=0; printf(“enter the number:”); scanf(“%d”,&n); for(i=1;i<=10;i++){ sum=sum+i; aver=sum/(double)10; } printf(“The sum of 10 no is :%d\n”,sum); printf(“The Average is :%lf”,aver); return 0; } This code is a … Read more