Untitled

 avatar
unknown
c_cpp
a year ago
308 B
3
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