Search found 1 match

by dorpon
Wed Jan 10, 2007 8:14 pm
Forum: Volume 5 (500-599)
Topic: 591 - Box of Bricks
Replies: 80
Views: 25011

591

can any one plz tell me what is the prob in my following program
#include<stdio.h>
main()
{
int x[100],n,i,y,z,l,k,j=1;
while(1)
{
y=0; l=0;
scanf("%d",&n);
if(n==0)
break;
for(i=0;i<n;i++)
{
scanf("%d",&x );
y+=x ;
}
z=y/n;
printf("set# %d\n",j);
for(i=0;i<n;i++)
{
if(x >z)
l+=(x ...

Go to advanced search