Untitled
unknown
c_cpp
2 years ago
308 B
4
Indexable
#include <iostream>
#include <string>
using namespace std;
string div2(string x) {
string d = " ";
int h = x.size();
for (int i = 0; i <=h; i++) {
d[i] = x[h - i];
}
return d;
}
int main()
{
string x;
cin >> x;
cout << div2(x);
} Editor is loading...
Leave a Comment