Răspuns :
#include <iostream>
using namespace std;
int main()
{
int x, y = 0;
cin >> x;
cout << x << ' ';
while(x >= 10)
{
y = y * 10 + x % 10;
x /= 10;
cout << y << x;
}
return 0;
}
using namespace std;
int main()
{
int x, y = 0;
cin >> x;
cout << x << ' ';
while(x >= 10)
{
y = y * 10 + x % 10;
x /= 10;
cout << y << x;
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
string n;
cin >> n;
for(int i = 0; i < n.size(); i++)
cout << n << '\n', rotate(n.rbegin(), n.rbegin() + 1, n.rend());
return 0;
}
using namespace std;
int main()
{
string n;
cin >> n;
for(int i = 0; i < n.size(); i++)
cout << n << '\n', rotate(n.rbegin(), n.rbegin() + 1, n.rend());
return 0;
}