CBSE BOARD X, asked by sangeethar033, 6 days ago

Write a C programme to find the sum of 10 numbers by reading the value from the user and display the value of the sum as output​

Answers

Answered by Shubhampro112
0

Answer:

#include <stdio.h>

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);

}

hope it is useful for u

Explanation:

Answered by JensonVivish
0

Answer:

#include <stdio.h>

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;

print f("The sum of 10 no is : %d\nThe Average is : %f\n",sum,avg);

Explanation:

Similar questions