/*C Program To Find The Sum and Average of Number Series Entered by the User*/

#include<stdio.h>

#include<conio.h>

void main()

{

int i,n;

float x,sum=0,avg;

printf(“\nHow Many Numbers Do You Wish To Add? “); 

scanf(“%d”,&n);

for(i=1;i<=n;i++)

{

                   printf(“\nEnter x: “);

                   scanf(“%f”,&x);

                   sum=sum+x;

}

avg=sum/n;

printf(“\n\nSum= %f\nAverage= %f”,sum,avg); 

getch();

}

121,974 total views, 66 views today

Get Free Email Updates..!
Join us for FREE to get instant email updates..! GobsInfo- Everything Unlimited
We hate spam. Your email address will not be sold or shared with anyone else.

7,985 Thoughts to “C Program To Find The Sum and Average of Number Series Entered by the Use”

  1. If you desire to increase your know-how only keep visiting
    this website and be updated with the most recent news posted here.

  2. I was suggested this web site by my cousin. I’m not
    sure whether this put up is written through him as nobody else realize such distinct
    approximately my problem. You are wonderful! Thank you!

  3. (iii) You are accountable to your work, so conserve a professional attitude
    when dealing with your customers. It is common for teachers to lament
    that students are not able to write despite having done quite well inside PMR English exam for 15-year-olds.

    Run-on sentences occur as a result of insufficient punctuation and happen when you become lost inside your essay.

Leave a Comment