coding blocks keshav

 avatar
unknown
c_cpp
3 years ago
377 B
8
Indexable
	string s;
	cin >> s;
	int n = s.length();
	for (int i = 0; i < n; ++i)
	{
		if (s[i] >= 65 and s[i] <= 90) {
			if (s[i + 1] >= 65 and s[i + 1] <= 90) {
				cout << s[i] << endl;
			}
			else {
				cout << s[i];
			}
		}
		else if (s[i] >= 97 and s[i] <= 122) {
			if (s[i + 1] >= 65 and s[i + 1] <= 90) {
				cout << s[i] << endl;
			}
			else {
				cout << s[i];
			}
		}
	}
Editor is loading...