prev


for loop

115.Average of 10 nos (01.08.2010)

/*
Program# 115
date : 14-01-2009
Average of 10 nos
*/

#include <stdio.h>
int main(){
int i,n,s;
float avg;
s=0;
for(i=0;i<10;i++)
{
scanf("%d",&n);
s+=n;
}
avg=(float)s/10;
printf("\n %f",avg);
}



next
blog comments powered by Disqus