TOPIC

50% wrong answer. what is the problem?

AldriN SauroV SarkeR [180204] asked 2 years ago

include

int main() { double M[12][12]; int i, j, count = 0; double sum = 0; char ch;

scanf("%c", &ch);
for (i=0; i<11; i++)
{
  for (j=0; j<11; j++)
  {
    scanf("%lf", &M[i][j]);
  }
}

for (i=0; i<5; i++)
{
  for (j=i+1; j<11-i; i++)
  {
    sum+=M[i][j];
    count++;
  }
}
printf("%0.1lf\n", sum/(double)count);
return 0;

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.