0_0_16716705_22507.cpp:3:31: error: '::main' must return 'int'
using namespace std;void main(){int n,m=0,k,j,t=0;while(cin>>n){string c[1001];int b[1000]={0};if(n==0) break;for(j=0;j<n;j++)cin>>c[j];for(j=0;j<n;j++)for(k=j;k<n;k++)if(c[j]==c[k])b[j]++;for(j=0;j<1000;j++)if(b[j]>m){m=b[j];t=j;}cout<<c[t]<<endl;}}
^
|