#include

int main()

{

long I,j,n,sum,average;

while(scanf("%ld",n)!=EOF)

{

for(I=0;I

int main()

{

long I,j,n,sum,average;

while(scanf("%ld",n)!=EOF)

{

for(I=0;I

#include

int main()

{

long I,j,n,sum,average;

while(scanf("%ld",n)!=EOF)

{

for(I=0;I

int main()

{

long I,j,n,sum,average;

while(scanf("%ld",n)!=EOF)

{

for(I=0;I

#include<stdio.h>#include<conio.h>main(){ int n,I,sum; float av; clrscr(); printf("nenter the value of n");

scanf("%d",&n); for(I=0;I<=n;I++) { sum=sum+I; } printf("n sum is: %d",sum); av=(float)sum/n; printf("nAverage is : %f",av); getch();}

scanf("%d",&n); for(I=0;I<=n;I++) { sum=sum+I; } printf("n sum is: %d",sum); av=(float)sum/n; printf("nAverage is : %f",av); getch();}

Didn't find the answer you were looking for?