coding blocks keshav
unknown
c_cpp
3 years ago
377 B
11
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...