| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
what is the wrong on my solution on problem 1014#include <iostream>
using namespace std;
int main()
{int i,j,sum=0,count=0;
int a[100][6];
for(i=0;i<50;i++)
{
for(j=0;j<6;j++)
{
cin>>a[i][j];
}
for(int k=0;k<6;k++)
{if(a[i][k]==0)
{count++;
}
}
if(count==6)
{
break;
}
count=0;
}
for(int m=0;m<i;m++)
{
for(int n=0;n<6;n++)
{
sum+=a[m][n];
}
if(sum%2==0)
{
cout<<"Collection #"<<m+1<<":"<<endl;
cout<<"Can't be divided.";
cout<<endl;
}
else
{cout<<endl;
cout<<"Collection #"<<m+1<<":"<<endl;
cout<<"Can be divided.";
cout<<endl;
}
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator