For this Question: Given two strings A and B. The task is to find if the string A can be obtained by rotating the string B by 2 places.The first line of the input contains the string A.
The second line of the input contains the string B.

Constaint:-

1 <= |A|, |B| <= 100Print 1 if the string A can be obtained by rotating string B by two places, else print 0.Sample Input:
amazon
azonam

Sample Output:
1

Input: string1 = “amazon”, string2 = “azonam”
Output: Yes
// rotated anti-clockwise

Input: string1 = “amazon”, string2 = “onamaz”
Output: Yes
// rotated clockwise, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;

#define pu push_back
#define fi first
#define se second
#define mp make_pair
#define int long long
#define pii pair<int,int>
#define mm (s+e)/2
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(int i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define sz 200000
string rotate(int x,string s)
{
	if(x>0)
	{
  string p="";
  int ns=s.size();
  for(int i=2;i<=ns+1;i++)
  {
  	int j=(i+ns*5)%ns;
  	p+=s[j];
  }
  return p;
	}else
  {
  	x*=-1;
  	string p="";
  int ns=s.size();
  for(int i=-4;i<ns-4;i++)
  {
  	int j=(i+ns*5)%ns;
  	p+=s[j];
  }
  	return p;
  }
}
signed main()
{
	
		string a,b;
		cin>>a>>b;
		int na=a.size();
		int nb=b.size();
		if(na!=nb) {
			cout<<0<<endl;
		}else
		{
            a=rotate(2,a);
           // cout<<a<<endl;
            if(a==b) cout<<1<<endl;
            else
            {
            	a=rotate(-4,a);
            	if(a==b) cout<<1<<endl;
            	else cout<<0<<endl;
            }
		}
	
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?