<form action="/Dave/C/section2_5_7.html" METHOD="GET">
<input type="submit" value="Return to exercise">
</form>
 
The Solution is: 
<pre>
/*	sumav.c - prints statistics: sum, average, sum of squares
                  of n inputted numbers*/

#include	<stdio.h>

main()
{
	float	x, sum, sq;
	int	i, n;

	printf("How many numbers? ");
	scanf("%d", &n);
	printf("Please enter number  1: ");
	scanf("%f", &x);
	sum = x;	/*	first value entered	*/
	sq = x*x;
	for (i = 2; i <= n; i++)	/*	i++ OR i = i + 1 OR i += 1	*/
	{
		printf("Please enter number %2d: ", i);
		scanf("%f", &x);
		sum += x;
		sq += x*x;
	}
	printf("Sum = %10.3f, average = %10.3f, sum of squares = %10.3f\n", sum, sum / n, sq);
	
	exit(0);
}
</pre>
<form action="/Dave/C/section2_5_7.html" METHOD="GET"> 
<input type="submit" value="Return to exercise">
</form>  
 
