|
|
back to boardthe test 2? i get wa #include<stdio.h> #include<math.h> #include<string.h> long gresit,u,i,ok,vb1,o,inp,poz; char s[10001]; int main() { while(gets(s)!=0) { u=strlen(s); vb1=0; inp=0; o=0; ok=0; for(i=0;i<u;i++) { if(s[i]=='.' || s[i]==',' || s[i]==';' || s[i]=='-' || s[i]==':' || s[i]==' ') {vb1=0; ok=0; o=0;} else { o++; poz=i; } if(vb1==0 && s[i]>='a' && s[i]<='z' && inp==0) { gresit++; vb1=1; inp=1; } if(ok==1 && s[i]>='A' && s[i]<='Z' && s[i+1]>='A' && s[i+1]<='Z' || (o>=3 && s[i]>='A' && s[i]<='Z') || (s[poz]>='a' && s[poz]<='z' && s[i]>='A' && s[i]<='Z')) gresit++; if(vb1==0 && s[i]>='A' && s[i]<='Z' && inp==0) { vb1=1; inp=1; } if(s[i]=='.' || s[i]=='!' || s[i]=='?') inp=0; if(s[i]>='a' && s[i]<='z' || s[i]>='A' && s[i]<='Z') ok=1; } } printf("%ld",gresit); return 0; } whi do i get wa? test 2? can you give it to me? |
|
|