|
|
вернуться в форумAndrey Can you tell me what's wrong with my code, I cheked more than 10 times, may be something wrong with input? #include <vector> #include <string> #include <stdio.h> #include <iostream> using namespace std; int main() { char s[1000]; //string s; int i=0; char c; bool sign=true; gets(s); while (!EOF) { i=0; while (s[i]!='\0') { if (s[i]=='.'||s[i]=='!'||s[i]=='?') sign=true; if (s[i]>='A'&&s[i]<='Z'&&sign) {sign=false;} else if (s[i]>='A'&&s[i]<='Z') s[i]=tolower(s[i]); cout << s[i]; i++; } gets(s); } return 0; } |
|
|