求大神班忙看看哪里出错了?
求大神帮我看看这段代码哪出错了?
#include <stdio.h>
int main()
{
int arr[3][3] = {{1,2,3},{4,5,6},{7,8,9}};
int i,j;
int sum=0;
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
if((i/2.0==0)&&(j/2.0==0))
{
sum+=arr[i][j];
}
else if((i/2.0!=0)&&(j/2.0!=0))
{
sum+=arr[i][j];
}
}
}
printf("对角线元素之和是:%d\n",sum);
return 0;
}