Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Saturday, April 3, 2010

To find and print mean

Kindle Wireless Reading Device (6" Display, Global Wireless, Latest Generation)Input 10 integers values of x and calculate and print its mean(m).

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main( )
{
int i, x[10];

float s1=0, m;
clrscr( );
printf("Input 10 values of x, one at a time\n");
for(i=1; i<=10; i++)
{
scanf("%d", &x[i]);
s1 = s1+x[i];
}
m = s1/10;
printf("\n The mean is %f\n", m);
}
Kindle Wireless Reading Device (6" Display, Global Wireless, Latest Generation)

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP