#include<bits/stdc++.h>
using namespace std;
int main() {
string s; cin >> s; int n = s.length();
for(int i = 0; i < n; i++){
if(s[i] >= āAā && s[i] <= āZā){
cout<< endl << s[i];
}
cout<<s[i];
}
}
Wrong answer even on sample case
Hi, the problem is that you are printing the Capital letters twice. Please put print statement after if block inside a else block.
1 Like