|
|
back to boardWhat wrong whith my prog: WA test #1 Posted by XMAN 14 Nov 2009 03:32 Please help; Here my prog: #include<stdio.h> #include<string.h> int main() { int n,i,j,cmp=0; char t[1001][31],c; scanf("%d",&n); for(i=0;i<n;i++) gets(t[i]); for(i=0;i<n;i++)
for(j=0;j<i;j++) {if(strcmp(t[i],t[j])==0) {cmp++;break;} } printf("%d",cmp); return 0; } |
|
|