Please Login in order to post a comment
using namespace std;
int main() { // Complete the program string a, b; cin>>a; cin>>b; cout<
[](https://)
#include <iostream> #include <string> using namespace std; int main() { string a , b; cin>>a; cin>>b; cout<<a.size()<<" "<<b.size()<<endl; cout<<a+b<<endl; char temp = a[0]; a[0] = b[0]; b[0] = temp; cout<<a<<" "<<b<<endl; return 0; }
Here is a simple solution
int main() {
string a , b; cin>>a; cin>>b; cout<<a.size()<<" "<<b.size()<<endl; cout<<a+b<<endl; char temp = a[0]; a[0] = b[0]; b[0] = temp; cout<<a<<" "<<b<<endl; return 0;
}
int main() { string a,b; cin>>a>>b; cout<<a.size()<<" "<<b.size()<<endl; cout<<a+b<<endl; cout<<b[0]+a.substr(1,a.size()-1)<<" "<<a[0]+b.substr(1,b.size()-1)<<endl; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
include
include
using namespace std;
int main() { // Complete the program string a, b; cin>>a; cin>>b; cout<
include
include
using namespace std;
int main() { // Complete the program string a, b; cin>>a; cin>>b; cout<
> * }
[](https://)
**Approach Using C++
Here is a simple solution
include
include
using namespace std;
int main() {
}