coding blocks keshav

mail@pastecode.io avatar
unknown
c_cpp
a year ago
377 B
1
Indexable
Never
	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];
			}
		}
	}