semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
main()
{
      int i,a;
      scanf("%d",&i);
      while(i!=1)
      {
                 if (i==1) break;
                 else if(i%2) 
                 {a=3*i+1;
                 printf("%d*3+1=%d\n",i,a);
                 i=a;
                 continue;}
                 else
                 {
                 a=i/2;
                 printf("%d/2=%d\n",i,a);
                 i=a;
                 }
      
                 }
                 printf("End");
                 getchar();
                 getchar();
                 getchar();
}
int main()
{
	int i,num;//num????,i????
	cin>>num;//??
	if(num!=1)//??num????1,???????
	{
		for(i=0;num!=1;i++)
		{
			if(num%2==0) {cout<<num<<"/2="<<num/2<<endl;num=num/2;}//??????
			else {cout<<num<<"*3+1="<<num*3+1<<endl;num=num*3+1;}
		}
		cout<<"End";//??END
	}
	else cout<<"End"<<endl;//?num?1,??end

	return 0;

}
int main()
{
 int inta=0,i,a=0,b=0;//inta????????i?????
	  cin>>inta;
	  for(i=0;;i++)
	  {
		  if(inta%2==0)
		  {
			  
			  a=inta/2;
			  cout<<inta<<"/2="<<a<<endl;
			  inta=a;
		  }
		  
		  if(inta%2!=0&&inta!=1)
		  {
			  
			  b=inta*3+1;
			  cout<<inta<<"*3"<<"+1="<<b<<endl;
			  inta=b;
		  }
		  
		  if(inta==1)
		  {
			  break;
			  
		  }
			 
	  }

cout<<"End";  
  
   cin.get();cin.get();cin.get();cin.get();
   return 0;
}
void main()
{
	int n,i,j,a,b;
	scanf("%d",&n);
	a=n;
	for(i=0;a!=1;i++)
	{
		if(a%2!=0)
		{
			b=a*3+1;
			printf("%d*3+1=%d\n",a,b);
			a=b;
		}
		else
		{
			b=a/2;
			printf("%d/2=%d\n",a,b);
			a=b;
		}
	}
	printf("End");
}
/*
 * jiaogu.cpp
 *???????
 *  Created on: 2012-11-25
 *      Author: ??
 */

void jiaogu(int k) {
	int m;
	if (k == 1) {
		cout << "End";
		return;//??????????
	}
	if (k % 2 == 0) {
		m = k / 2;
		printf("%d/2=%d\n", k, m);
		jiaogu(m);
		return;//???????2???????
	}
	if (k % 2 == 1) {
		m = 3 * k + 1;
		printf("%d*3+1=%d\n", k, m);
		jiaogu(m);
		return;//??????*3+1??????
	}
}

int main() {
	int u;
	cin >> u;//??
	jiaogu(u);//??
	return 0;
}
int main()
{
	int jiaogu(int m);
	int n;
	scanf("%d",&n);
	jiaogu(n);
	return 0;
}
int jiaogu(int m)
{
	int a1;
	if(m==1)
	printf("End");
	else if(m%2==1)
	{
		a1=m*3+1;
		printf("%d*3+1=%d\n",m,a1);
		return(jiaogu(a1));
	}
	else if(m%2==0)
	{
		a1=m/2;
		printf("%d/2=%d\n",m,a1);
		return(jiaogu(a1));
	}
}
void verify(int n)
{	
	if(n!=1)
	{
		if(n%2==1)
			cout<<n<<"*3+1="<<n*3+1<<endl;
		else 
			cout<<n<<"/2="<<n/2<<endl;
		verify((n%2==1? n*3+1:n/2));
	}
	else cout<<"End";
}
int main()
{
	int m;
	cin>>m;
	verify(m);
	return 0;
}
int main ()
{
	int n,i,a,b;
	cin>>n;
	if (n==1)
		cout<<"End"<<endl;
	else
		
		{
		for (i=0; ; i++)
		{
		  if (n%2==0)
		  { a=n/2;
			  cout<<n<<"/"<<2<<"="<<a<<endl;
			  n=n/2;}
		  else
		  {b=3*n+1;
			  cout<<n<<"*"<<3<<"+"<<1<<"="<<b<<endl;
			  n=3*n+1;}
		  if (n==1)
			  break;
		}
		
	
		cout<<"End"<<endl;}
		return 0;
}
/**
* @file 4.cpp
* @auther ???
* @date   2011/10/26
* @description
*      ????????????????? 
*/ 


int suan1(int p)
{
cout<<p<<"*"<<3<<"+"<<1<<"="<<p*3+1<<endl;
return(p*3+1);

}

int suan2(int p)
{
cout<<p<<"/"<<2<<"="<<p/2<<endl;
return(p/2);

}

int main()
{
 int t;
 cin>>t;

 while (t>1)
 {
   if (t % 2==0)
	  t= suan2(t);
   else
	   t=suan1(t);
 
 
 }
 cout<<"End";
    return(0);
    
    
}
main()
{
    int a,b;
    scanf("%d",&a);
    haha: 
    if (a==1)printf("End\n");
    else
    { 
     if(a%2==1)
       {
        b=a*3+1;  
        printf("%d*3+1=%d\n",a,b);
        a=(a*3)+1;goto haha;
       }
     if(a%2==0)
       {
        b=a/2;
        printf("%d/2=%d\n",a,b);
        a=a/2;
        goto haha;
       }
    }
}
main()
{
  int a,b,c,d,e,i,j,n;
  scanf("%d",&n);
  do
  {
	if(n==1)
		printf("End");
	else
	{
	  if(n%2==1)
	  {  printf("%d",n);
	     n=n*3+1;
	     printf("*3+1=%d\n",n);
		 if(n==1)
			 printf("End");
	  }
	  if(n%2==0)
	  {
	     printf("%d",n);
		 n=n/2;
		 printf("/2=%d\n",n);
if(n==1)
			 printf("End");
	  }
	}
  }while(n!=1);
}
int main(int argc, char* argv[])
{
int n,i,a[100];
scanf("%d",&n);
	a[1]=n;
	if (n!=1)
{for (i=1;a[i]!=1;i++)
	
{  if (a[i]%2==0) 
	
	
{	a[i+1]=a[i]/2;
	printf("%d/2=%d\n",a[i],a[i+1]);
        }
	if (a[i]%2==1)
        {   a[i+1]=a[i]*3+1;
	printf("%d*3+1=%d\n",a[i],a[i+1]);
        }
    }
    printf("End");
}
	if (n==1)
    printf("End");
return 0;
}
int main()
{
    int m,n;
	cin>>n;
	m=n;
	if(n==1)cout<<"End"<<endl;
    else
	{
	for(;m!=1;)
	{
		if(n%2==1)
		{
	    n=m*3+1;
        cout<<m<<"*3+1="<<n<<endl;
		m=n;
		}
		else 
		{n=m/2;
		cout<<m<<"/2="<<n<<endl;
		m=n;
		}
	}
	cout<<"End"<<endl;
	}
	return 0;
}
int main()
{int a,n,i;
scanf("%d",&n);

for(i=0;i<100;i++)
{ if(n==1)
{printf("End");
break;}

else
{
if (n%2==0)
{a=n/2;
	
printf("%d/2=%d\n",n,a);
n=a;
continue;}
else if(n%2==1)
{
a=n*3+1;}
printf("%d*3+1=%d\n",n,a);
n=a;
continue;}}

	return 0;
}
int main( )
{ 
	int num,m;
	cin>>num;
	while(num!=1)
	{
		m=num;
		if(num%2==0)num=num/2,cout<<m<<"/"<<"2="<<num<<endl;
		else num=num*3+1,cout<<m<<"*3+1="<<num<<endl;
	}
	cout<<"End";                                         
    return 0;
}
int main()
{
    int n;
    cin>>n;
    if(n==1)
    {
        cout<<"End";
        return 0;
    }
    while(n!=2)
    {
        if(n%2)
        {
            cout<<n<<'*'<<3<<'+'<<1<<'=';
            n=n*3+1;
            cout<<n<<endl;
        }
        else
        {
            cout<<n<<'/'<<2<<'=';
            n=n/2;
            cout<<n<<endl;
        }
    }
    cout<<2<<'/'<<2<<'='<<1<<endl;
    cout<<"End";
    return 0;
}
void run(int x){
	int lt;
	if(x==1){
		printf("End");
	}
	else if(x%2){
		lt=x*3+1;
		printf("%d*3+1=%d\n",x,lt);
		run(lt);
	}
	else if(x!=2){
		lt=x/2;
		printf("%d/2=%d\n",x,lt);
		run(lt);
	}
	else{
		printf("2/2=1\nEnd");
	}
}
int main(){
	int a;
	cin>>a;
	run(a);
	
}
int main(){
	int n;
	cin>>n;
	while(1)
	{
		if(n==1) {//?????end

		cout<<"End"<<endl;break;
	}
	else
		while(n!=1)
		{
			if(n%2==1) {//??????
				cout<<n<<"*3+1="<<n*3+1<<endl;
				n=n*3+1;
			}
			else{//????
				cout<<n<<"/2="<<n/2<<endl;
				n/=2;
			}
		}
	}
}
/*
 * 1110.cpp
 *
 *  Created on: 2012-11-10
 *      Author: wangyinzhi
 */


int f(int x){
	 if(x==1)  return 1;
	 if(x%2==0){
		 cout<<x<<"/2="<<x/2<<endl;
		 return f(x/2);//????????
	 }
     if (x%2==1){
    	 cout<<x<<"*3+1="<<3*x+1<<endl;
    	 return f(3*x+1);//????????
     }
 }

 int main(){
     int x;
	 cin>>x;
	 f(x);//??
	 cout<<"End"<<endl;//??
	 return 0;
 }
int main()
{int n,t=0,i;//????n,t,i,??t????0
cin>>n;
while(n!=1)
{if(n%2==0)
{i=n/2;
printf("%d/2=%d\n",n,i);}
else {i=n*3+1;
printf("%d*3+1=%d\n",n,i);}
n=i;
}
cout<<"End"<<endl;
return 0;
}
int main ()
{
	int n,i,j,a[100000];
	scanf("%d",&n);
	a[0]=n;
	if(n==1)
	{
		printf("End");
	}
	else 
	{
	for(i=1;i<=100000;i++)
	{
	if(a[i-1]%2!=0)
	{
		a[i]=a[i-1]*3+1;
		printf("%d*3+1=%d\n",a[i-1],a[i]);
	}
	if(a[i-1]%2==0)
	{
		a[i]=a[i-1]/2;
	printf("%d/2=%d\n",a[i-1],a[i]);
	}
	if(a[i]==1)
		break;
	}
	printf("End");
	}
	return 0;
}
void count(int n)
{
	int a,b,i,j;
	if(n==1)printf("End\n");
	else
	{
		if(n%2!=0)
		{
			a=n*3+1;
			printf("%d*3+1=%d\n",n,a);
			n=a;
			count(n);
		}
		else 
		{
			b=n/2;
			printf("%d/2=%d\n",n,b);
			n=b;
			count(b);
		}
	}
}

void main()
{
	int n;
	scanf("%d",&n);
	count(n);

}
int main()
{
int n;
scanf("%d",&n);
while(n!=1)
{if(n%2==0) {n=n/2;printf("%d/2=%d\n",2*n,n);}
else {n=3*n+1;printf("%d*3+1=%d\n",(n-1)/3,n);}
}
 printf("End");
return 0;
}
int main()
{
	int a[100],b;
	
	scanf("%d",&a[0]);
	for(b=0;b<100;b++)
	{
		if(a[b]%2!=0&&a[b]!=1)
		{
			a[b+1]=a[b]*3+1;
			printf("%d*3+1=%d\n",a[b],a[b+1]);
		}
		else if(a[b]%2==0)
		{
			a[b+1]=a[b]/2;
			printf("%d/2=%d\n",a[b],a[b+1]);
		}
		else
		{
			printf("End");
		
		break;
		}
	}
	
    return 0;
}
int xx(int k);
int main()
{
	int n,i;
	scanf("%d",&n);
	if(n==1)
		printf("End");
	else
	{
		for(i=n;i>1;i=xx(i))
		{
			if(i%2==0)
			{
				
				printf("%d/2=%d\n",i,i/2);
			}
			if(i%2==1)
			{
				
				printf("%d*3+1=%d\n",i,i*3+1);
			}
		}
		printf("End");
	}
	return 0;
}
int xx(int k)
{
	int c;
	if(k%2==0)
		{
			c=k/2;
			
		}
		if(k%2==1)
		{
			c=k*3+1;
			
		}
		return c;
}
/*
  Name: ????
  Author: chenminhuan?1200012757? 
*/


int n;
void  print(int n)
{
      if (n==1)          //??n==1  ???? 
      {
         printf("End");
         return;
      } 
      if (n%2)          //??n??? ???n*3+1 
      {
         printf("%d*3+1=%d\n",n,n*3+1);
         print(n*3+1);
      } else           //??n??? ???n/2 
      {
         printf("%d/2=%d\n",n,n/2);
         print(n/2);   
      }
}
int main()
{
    cin>>n;
    print(n);          //???? 
    return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	for(;n!=1;){
	if(n%2==0){
	printf("%d/%d=%d\n",n,2,n/2);
	n=n/2;
	}
	else{
	printf("%d*%d+%d=%d\n",n,3,1,n*3+1);
	n=n*3+1;
	}
	}
	if(n==1)
	printf("End");
  return 0;
}
int main()
{
    int n,i;
    scanf("%d",&n);
    
    if (n==1) 
    printf("End");
    else{
         for(;n!=1;){
             if (n%2==0){
             printf("%d/2=%d\n",n,n/2);
             n=n/2;
                 } 
             else {
             printf("%d*3+1=%d\n",n,n*3+1);
             n=n*3+1;
                 }
             }
         printf("End");                
         }
    return 0;
    }
int isjishu(int x);
int isoushu(int y);
int main()
{
	int n;

	scanf("%d",&n);
	for(;;)
	{
		if(n==1) break;
		if(n%2==0) n=isoushu(n);
		else n=isjishu(n);
		
	}
	printf("End");
	return 0;
}


int isjishu(int x)
{
	int temp1=x;
	x=x*3+1;
	printf("%d*3+1=%d\n",temp1,x);
	return x;
}
int isoushu(int y)
{
	int temp2=y;
	y=y/2;
	printf("%d/2=%d\n",temp2,y);
	return y;
}
int main()
{
    int n;                              //???n
    cin>>n;
    int x;                              //??????x
    x=n;                                //???x 
    for (;x!=1;)                        //x??1???????? 
    {
        if (x%2==1)                     //???? 
        {
            cout<<x<<"*3+1=";
            x=x*3+1;
            cout<<x<<'\n';
        }
        else                            //???? 
        {
            cout<<x<<"/2=";
            x=x/2;
            cout<<x<<'\n';
        }
    }
    cout<<"End";                        //??
    return 0;                           //?> w <? 
}
int main()
{
	int n,m;
	char a='=',b='/',c='*',d='+';
	scanf("%d",&n);
		while(n!=1)
		{
			if (n%2==0)
			{	
				m=n/2;
				printf("%d%c%d%c%d\n",n,b,2,a,m);
		    	n=n/2;
			}
			else
			{
				m=n*3+1;
				printf("%d%c%d%c%d%c%d\n",n,c,3,d,1,a,m);
				n=n*3+1;
			}
		}
		printf("End");
	
		return(0);
}
/*
 * ??????????????????3?1??????????2?????????????????????????1??????????5????????16?8?4?2?1?
??????????????????1????????

????
????

????
??????1???????????????????????????7??????
7*3+1=22
22/2=11
11*3+1=34
34/2=17
17*3+1=52
52/2=26
26/2=13
13*3+1=40
40/2=20
20/2=10
10/2=5
5*3+1=16
16/2=8
8/2=4
4/2=2
2/2=1
??????"End"??????1?????"End"

 *
 */

int main()
{
	int n,i;
	int a[200];
	cin>>n;
	a[0]=n;
	for(i=0;a[i]!=1;i++){
		if(a[i]%2==0)
		{

			cout<<a[i]<<"/2="<<a[i]/2<<endl;
			a[i+1]=a[i]/2;
		}
		else
		{
			cout<<a[i]<<"*3+1="<<3*a[i]+1<<endl;
			a[i+1]=3*a[i]+1;
		}
	}
		cout<<"End"<<endl;
	return 0;
}
int lgm( int num )
{
   if( num == 1 )
   return 0;
   if( num % 2 == 0 )
   {
   printf("%d/2=%d\n",num,num/2);
   lgm( num/2 );
   }
   if( num % 2 == 1  )
   {
   printf("%d*3+1=%d\n",num,num*3+1 );
   lgm( num*3+1 );
   }
}
int main()
{
    int n;
    scanf("%d",&n );
    lgm( n );
    printf("End");
}
int main(){
    int a,b;
    scanf("%d",&a);
    if(a==1){
             printf("End");
             }
    else{
    for(int i=1;;i++){
            if(a%2==0){
                       b=a/2;
                       printf("%d/2=%d\n",a,b);
                       a=b;}
            else{
                 b=a*3+1;
                 printf("%d*3+1=%d\n",a,b);
                 a=b;
                 }
            if(a==1){
                     printf("End");
                     break;}}}
     int y;
    scanf("%d",&y);
    return 0;}
int main()
{
    int n,i,a,b;
    cin>>n;
    if (n!=1)
    {                                     //??????n 
    if (n%2==0)
       {
        a=n/2;
        cout<<n<<"/"<<2<<"="<<a<<endl;          //?????? 
       }
    else
        {
         a=n*3+1;
         cout<<n<<"*"<<3<<"+"<<1<<"="<<a<<endl; //?????? 
        }
    for (i=1; ;i++)
        {
         if (a%2==0)
            {
             b=a/2;
             cout<<a<<"/"<<2<<"="<<b<<endl;     //?????? 
             a=b;
            }
         else 
              {
               b=a*3+1;
               cout<<a<<"*"<<3<<"+"<<1<<"="<<b<<endl;
               a=b;                                  //?????? 
              }
         if (a==1)
            break;                                   //????1?????? 
        }
    cout<<"End"<<endl;                               //??????End 
    }
    else 
         {
          cout<<"End"<<endl;
         }
    return 0;
}
int main()
{
  void jiaogu(int n);
  int m;
  scanf("%d",&m);
  jiaogu(m);
}

void jiaogu(int n)
{
   void shizi(int x);
   if(n==1)
   printf("End");
   if(n%2==0)
   {shizi(n); 
    jiaogu(n/2);}
   if(n%2!=0&&n!=1)
   {shizi(n);
   jiaogu(n*3+1);}
   
}
void shizi(int x)
{  int y;
   if(x%2==0)
   {y=x/2; 
   printf("%d/2=%d\n",x,y);}
  if(x%2!=0)
  {y=(x*3+1);
   printf("%d*3+1=%d\n",x,y);}
}
int main ()
{
	int n = 0 ;
	int m = 0 ;
    cin >>n ;
	if ( n == 1) cout << "End" << endl ; //??n??1 ????? End
	else 
	{
		do    //?n???1?
		{
			if ( n%2 == 1)      //??n???????????
			{
				m = n ;
				n = n*3 + 1 ;
				cout  << m << "*" << 3 << "+" << 1 << "=" << n <<endl ;
			}
			else       // ????//??n???????????
			{
				m = n ;
				n = m/2 ;
				cout << m << "/" << 2 << "=" << n <<endl ;
			}
			
		}
		while ( n != 1) ;
		cout << "End" <<endl ;
	}
	return 0 ;

}
int main()
{
	int a,b,d;
	float c;
	scanf("%d",&a);
	while(a>1)
	{
		b=a%2;
		d=a*3+1;
		c=(float)a/2;
		if(b==1) 
		printf("%d*3+1=%d\n",a,d);
		else if(b==0) 
		    printf("%d/2=%.0f\n",a,c);
		if(b==1) a=d;
		else a=c;
	}
	printf("End");
}
void main()
{
	int n;
	scanf("%d",&n);
	void print1(int n);
	void print2(int n);
	int printf1(int n);
	int printf2(int n);
	if(n==1)printf("End\n");
	else
	{
		int i;
		for(;n!=1;)
		{
			if(n%2==0)
			{
				print1(n);
				n=printf1(n);
			}
			else
			{
				print2(n);
				n=printf2(n);
			}
		}
		printf("End\n");
	}
}
int printf1(int n)
{
	int m;
	m=n/2;
	return m;
}
void print1(int n)
{
	printf("%d/2=%d\n",n,n/2);
}
int printf2(int n)
{
	int m;
	m=n*3+1;
	return m;
}
void print2(int n)
{
	printf("%d*3+1=%d\n",n,n*3+1);
}
int main(){
	int n,m;
	scanf("%d",&n);
	if(n==1){
		printf("End");
		return 0;
	}else {
	while (1){
		if(n%2==0){
			m=n;
			n=n/2;
			printf("%d/2=%d",m,n);
			printf("\n");
		}else {
			m=n;
			n=3*n+1;
			printf("%d*3+1=%d",m,n);
			printf("\n");
		}
		if (n==1){
			break;
		}
	}
	printf("End");
	}
	return 0;
}
int f1( int );//??
int f2( int );//??
void opration( int ) ;//??????
int main()//????
{
	int n ;
	cin >> n ;
	opration( n ) ;

	return 0 ;
}
int f1( int n )
{
	return n*3+1 ;
}
int f2( int n )
{
	return n/2 ;
}
void opration( int n )
{
	while ( n != 1 )
	{
		if ( n % 2 == 1 )
		{
			cout << n << "*3+1=" << f1(n) << endl ;
			n = f1(n) ;
		}
		else
		{
			cout << n << "/2=" << f2(n) << endl ;
			n = f2(n) ;
		}
	}
	cout << "End" ;
}
// ( > w < ) finished~
int main()
{
    int a,b;
    scanf("%d",&a);
    if(a!=1)
    {
            do
            {
                   if(a%2==1)
                   {
                               b=a*3+1;
                               printf("%d*3+1=%d\n",a,b);
                   }
                   else if(a%2==0)
                   {
                               b=a/2;
                               printf("%d/2=%d\n",a,b);
                   }
                   a = b;
            }
            while(a!=1);
            printf("End");
    }
    else
    {
        printf("End");
    }
    getchar();
    getchar();
    getchar();
    getchar();
    getchar();
    getchar();
}
main()
{
      int a,b,c,d=2,e=3,f=1;
      scanf("%d",&a);
      while(a>1)
      {
         if(a%2==0)
         {
                   b=a/2;
                   printf("%d/%d=%d\n",a,d,b);
                   a=b;
                   }
         else
         {
             c=3*a+1;
             printf("%d*%d+%d=%d\n",a,e,f,c);
             a=c;
             }
             }
             printf("End\n");
           }
int main()
{   int ji(int x);
    int ou(int y);
	int n;
    scanf("%d",&n);
	while(1){
		if(n!=1){
			if(n%2==0){
				n=ou(n);
			}
			else{
				n=ji(n);
			}
		}
		else{
			printf("End");
			break;
		}
	}
	return 0;
}
int ji(int x)
{
	int z;
	z=x*3+1;
	printf("%d*3+1=%d\n",x,z);
	return(z);
}
int ou(int x)
{
	int z;
	z=x/2;
	printf("%d/2=%d\n",x,z);
	return(z);
}
//********************************
//*???1.cpp   **
//*?????? 1200012768 **
//*???2012.11.  **
//*???????  **
//********************************
int num(int n);
int main()
{
	int n;
	cin >> n;
	while (n != 1)
		n = num(n);
	cout << "End\n"; 
	return 0;
}
int num(int n)
{
	if (n % 2 == 0)
	{
		cout << n << "/2=" << n / 2 << endl;
		return n / 2;
	}
	else
	{
		cout << n << "*3+1=" << n * 3 + 1 << endl;
		return n * 3 + 1;
	}
}
int main(int argc, char* argv[])
{
	int a,i,b;
	scanf("%d",&a);
	for(i=1;i<=1000;i++)
	{
		if(a==1)
	{
		printf("End");
		break;
	}
	if(a%2==1)
	{
		b=a*3+1;
		printf("%d*3+1=%d\n",a,b);
		a=b;
	}
	else
	{
		b=a/2;
		printf("%d/2=%d\n",a,b);
		a=b;
	}
	
	}
	return 0;
}
void ji(int);
void ou(int);
int main()
{
	int n;
	cin >> n;
	if(n % 2 == 0)
		ou(n);
	if(n % 2 != 0)
		ji(n);
	return 0;
}
void ji(int n)
{
	if(n == 1)
		cout << "End";
	if(n != 1)
	{
		int x;
	    x = n * 3 + 1;
	    cout << n << "*" << 3 << "+" << 1 << "=" << x << endl;
		ou(x);
	}
}
void ou(int n)
{
	int y;
	y = n / 2;
	cout << n << "/" << 2 << "=" << y << endl;
	if(y % 2 == 0)
		ou(y);
	if(y % 2 != 0)
		ji(y);
}
int main()
{
	int n,j,k;
	cin>>n;
	while(n!=1)//???????
	{
		if(n%2==0)
		{
			cout<<n<<"/2="<<n/2<<endl;
			n=n/2;
			if(n==1)
				break;
		}
		if(n%2!=0)
		{
			cout<<n<<"*3+1="<<n*3+1<<endl;
			n=n*3+1;
			if(n==1)
				break;
		}
	}
	cout<<"End";

		
	return 0;
}
int main()
{
	int i,n,a[100];
	scanf("%d",&n);
	if(n==1) printf("End");
	else
	{
		a[0]=n;
		i=0;
		do
		{
		    if(a[i]%2==0)
			{
			     a[i+1]=a[i]/2;
			     printf("%d/2=%d\n",a[i],a[i+1]);
			}
			else
			{
				a[i+1]=a[i]*3+1;
				printf("%d*3+1=%d\n",a[i],a[i+1]);
			}
			i++;
		} while(a[i]!=1);
		printf("End");
	}
}
int Is_OddNumber(int x);

int main()
{
	int number, result, mark;
	cin >> number;
	result = number;    // ??????
	if (number== 1)
	{
		cout << "End";
	}
	else{
	do 
	{   int Is_OddNumber(int x);
        int f = Is_OddNumber(result);
		if (f == 0)       // ??f?0???number???
		{
            mark = result;
			result = result / 2;
			if (result != 1)
			{
				cout << result * 2 << "/2=" << result << endl;
			}
		}
		else
		{
			mark = result;
			result = result * 3 + 1;
			if (result != 1)
			{
				cout << (result - 1) / 3 << "*3+1=" << result << endl;
			}

		}
	} while (result != 1);
	if (mark == 2)
	{
		cout << "2/2=1" << endl;
	}
	else 
	{
		cout << "0*3+1=1" << endl;
	}
    if (result == 1)
	{
		cout << "End";
	}
	}
    return 0;
}


int Is_OddNumber(int x)
{
	int f;
	if ( x % 2 == 0)
	{
		f = 0;
	}
	else 
	{
		f = 1;
	}
	return f;
}
int main()
{
	int n,a,b;
	cin>>n;
	while(n!=1){//????
		if(n%2==0){//?????2
			a=n/2;
			cout<<n<<"/"<<"2"<<"="<<a<<endl;
			n=a;
		}
		else{//????3?1
			b=n*3+1;
			cout<<n<<"*"<<"3"<<"+"<<"1"<<"="<<b<<endl;
			n=b;
		}
	}
	cout<<"End"<<endl;//???1??end
	return 0;
}
//****************************************
//*???????                            **
//*????? 1100013004                     **
//*???2010.11.14                          **
//****************************************
int a,b;
int even(int a)
{
	b = a / 2;
	cout<<a<<"/"<<2<<"="<<b<<endl;
	return b;
}
int odd(int a)
{
	b = a * 3 + 1;
	cout<<a<<"*"<<3<<"+"<<1<<"="<<b<<endl;
	return b;
}
int main() 
{
    int a;
	cin>>a;
	if(a == 1)
		cout<<"End"<<endl;
	else
	{
		while (a > 1)
		{
			if( a % 2 == 0)
			{
				a = even(a);
			}
			else
			{
				a = odd(a);
			}
		}
		cout<<"End"<<endl;
	}
    return 0;
}
int main()
{
   int a;
   scanf("%d",&a);
   if(a==1)
      printf("End");
      else
      {
        do{
        if(a%2==0)
          {printf("%d",a);
           a=a/2;
           printf("/2=%d\n",a);
          }
        else 
          {
           printf("%d*3+1=",a);
           a=3*a+1;
           printf("%d\n",a);
          }
          }
        while(a!=1);
        printf("End");
      }
   getchar();
   getchar(); 
   return 0;
}
int j(int x);
int main()
{
int e,k,n,i,l,a[1000],b[1000];
scanf("%d",&n);
a[0]=n;
k=n;
l=0;
e=0;
while(1)
{
	if(n==1)
	{
		l++;
		a[l]=0;
		e++;
		break;
	}
	if(n%2==0)
	{
		b[l]=0;
	}
	else
	{
		b[l]=1;
	}
	n=j(n);
	a[l]=n;
	l++;
	a[l]=j(n);
	e++;
}
if(e==1)
{
	printf("End");
}
if(e==2)
{
	printf("%d/2=%d\n",2,1);
	printf("End");
	return 0;

}
for(i=0;i<e-1;i++)
{
	if(i==0)
	{
	    if(b[i]==0)
		{
	    	printf("%d/2=%d\n",k,a[i]);
		}
    	else
		{
	    	printf("%d*3+1=%d\n",k,a[i]);
		}
	}
	else if(i>=1&&i<e-2)
	{
		if(b[i]==0)
		{
	    	printf("%d/2=%d\n",a[i-1],a[i]);
		}
	     else
		 {
	    	printf("%d*3+1=%d\n",a[i-1],a[i]);
		 }
	}
	else if(i==e-2)
	{
		printf("%d/2=%d\n",a[i-1],a[i]);
		printf("End");
		return 0;
	}
}
return 0;
}
int j(int x)
{
	int a=0;
	if(x%2==0)
	{
		a=x/2;
	}
	else
	{
		a=3*x+1;
	}
	return a;
}
int main(){
	int a,b,i;
	cin>>a;
	
	for(i=1;i<10000;i++)
	{
		if(a==1)
	{cout<<"End"<<endl;
	return 0;}

		
	else if(a%2==0)
	{b=a/2;
	cout<<a<<"/2="<<b<<endl;
	a=b;}
	else
	{b=3*a+1;
	cout<<a<<"*3+1="<<b<<endl;
	a=b;}
}
	return 0;
}
int main()
{
	int n;
	scanf("%d\n",&n);
	void jg(int x);
	jg(n);
	return 0;
}
void jg(int x)
{
	if(x>1&&x%2==1){printf("%d*3+1=%d\n",x,x*3+1);jg(x*3+1);}
	if(x%2==0){printf("%d/2=%d\n",x,x/2);jg(x/2);}
	if(x==1)printf("End");
}
int main()
{
    int n,p;//???????n???????????p 
    cin>>n;//??n 
    while(n>1)
    {
          if(n%2==0)//??n??????? 
          {
              p=n/2;
              cout<<n<<"/2"<<"="<<p<<endl;//????? 
              n=p;//?p????n 
          }
          else
          {
                p=n*3+1;
                cout<<n<<"*3"<<"+1"<<"="<<p<<endl;//????? 
                n=p;
          }
     }
     cout<<"End"<<endl;
     return 0;
}
void jiaogu(int N){
	if (N==1){
		cout << "End" << endl;
		return;
	}
	if (N%2!=0){
		cout <<N<<"*"<<3<<"+"<<1<<"="<<3*N+1<<endl;
		return jiaogu(3*N+1);
	}
	if (N%2==0){
		cout <<N<<"/"<<2<<"="<<N/2<<endl;
		return jiaogu(N/2);
	}
}
int main() {
	int N = 0;
	cin >> N;
	jiaogu(N);
	return 0;
}
/*
 * 247.cpp
 *
 *  Created on: 2011-12-22
 *      Author: think
 */
int jishu(int n){
	cout<<n<<"*3+1="<<3*n+1<<endl;
	return 3*n+1;
}
int oushu(int n){
	cout<<n<<"/2="<<n/2<<endl;
	return n/2;
}
int main(){
	int n;
	cin>>n;
	for(;n!=1;){
		if(n%2!=0){
			n=jishu(n);
		}
		else n=oushu(n);
	}
	cout<<"End"<<endl;
	return 0;
}
main()
{
      int a;
      scanf("%d",&a);
      if(a<=0) printf("error");
      else
      {
      while(a!=1)
      {
                 if(a%2==1){
                            printf("%d*3+1=%d\n",a,a*3+1);
                            a=a*3+1;
                            }
                 else {
                      printf("%d/2=%d\n",a,a/2); 
                 a=a/2;
                 }
                 }
      printf("End");
}
      getchar();getchar();getchar();
      }
int main()
    {
        int n;
        int func(int n);
        scanf("%d",&n);
        if(n==1) printf("End");
        else {func(n);printf("End");}
        
        return 0;
    }
    int func(int n)
    {
        if(n%2==0) {n=n/2;printf("%d/2=%d\n",2*n,n);}
        else {n=3*n+1;printf("%d*3+1=%d\n",(n-1)/3,n);}
        if(n!=1) func(n);
    }
int main(){
int n,i,a[1000000],t=0;
scanf("%d",&n);
a[0]=n;
if(n==1)   {printf("End");}
else{
for(i=1;i++;){
	if(a[t]%2==0)  {a[t+1]=a[t]/2;   printf("%d/2=%d\n",a[t],a[t+1]);   t++;}
     if(a[t]==1)     {printf("End");break;}
	if(a[t]%2!=0)   {a[t+1]=1+a[t]*3;  printf("%d*3+1=%d\n",a[t],a[t+1]);  t++;}
	if(a[t]==1)     {printf("End");break;}
}
}



	return 0;
}