1.

Write a program to accept 10 numbers in an array and find the sum.

Answer»

Answer:

Image result for write a PROGRAM to accept 10 numbers in an array and find the SUM.

C EXERCISES: Read 10 numbers and find their sum and average

Pictorial Presentation:

Sample Solution:

C Code: #include void main() { int i,n,sum=0; float avg; printf("Input the 10 numbers : \n"); for (i=1;i<=10;i++) { printf("Number-%d :",i); scanf("%d",&n); sum +=n; } avg=sum/10.0; printf("The sum of 10 no is : %d\nThe Average is : %f\n",sum,avg); } ...

EXPLANATION:



Discussion

No Comment Found