My code is not getting acceoted but I tried all the test cases they’re working just fine.
#include
#include
#include
using namespace std;
int main() {
string s;
getline(cin, s);
int end2 = 0;
int i = 0;
while (i <= s.length()) {
if (isupper(s[i])) {
while (islower(s[i + 1])) {
cout << s[i];
i = i + 1;
}
}
cout << s[i];
if (i < s.length() - 1) {
cout << endl;
}
i = i + 1;
}
}