|
|
вернуться в форумWhere is my mistake? Where is my mistake? I have WA on test 2!!! #include <iostream> using namespace std; int main () { char c; int i,n,br=0,b=0,l=1; while (cin>>c) { if (c=='!'||c=='?'||c=='.') l=1; else { if (c>='a'&&c<='z') if (l==1) br++; if (c>='A'&&c<='Z') if (l==0) br++; l=0; } if (c=='!'||c=='?'||c=='.') { if (br>0) b+=1; br=0; } } cout<<b<<endl; return 0; } Re: Where is my mistake? u cout "b"= 1 Edited by author 15.02.2022 18:32 Edited by author 15.02.2022 18:32 |
|
|