write a program to input 10 number and find their sum and average
Answers
Input the 10 numbers :
Number-1 :1
Number-2 :2
Number-3 :3
Number-4 :4
Number-5 :5
Number-6 :6
Number-7 :7
Number-8 :8
Number-9 :9
Number-10 :10
The sum of 10 no is : 55
The Average is : 5.500000
{
int sum = 0;
int n = 10;
while(n--)
{
int x;
scanf("%d", &x);
sum = sum + x;
printf("%d", sum);