#include<stdio.h>
#include <stdlib.h>
#include<conio.h>
#include<time.h>
#include<string.h>
int main()
{
int a=0;
int b=0;
int c=0;
int d=0;
int m=0;
int i,t,h,n,k,x,y;
float r;
scanf("%d",&n);
srand((unsigned)time(NULL));
for(i=0;i<n;i++)
{
a=rand()%100;
b=rand()%100;
c=rand()%100;
d=rand()%100;
m=rand()%8;
if(a<b)
{
t=a;
a=b;
b=t;
}
if(c<d)
{
h=c;
c=d;
d=h;
}
switch(m)
{
case 0:
printf("\n%d+%d=",a,b);break;
case 1:
printf("\n%d-%d=",a,b);break;
case 2:
printf("\n%d*%d=",a,b);break;
case 3:
printf("\n%d/%d=",a,b);break;
case 4:
{y=b*c+a*d;x=a*c;}
printf("\n%d/%d+%d/%d=",a,b,c,d);break;
case 5:
{y=b*c-a*d;x=a*c;}
printf("\n%d/%d-%d/%d=",a,b,c,d);break;
case 6:
{y=b*d;x=a*c;}
printf("\n%d/%d*%d/%d=",a,b,c,d);break;
case 7:
{y=b*c;x=a*d;}
printf("\n%d/%d/%d/%d=",a,b,c,d);break;
default:
printf("something is wrong!\n");
break;
}
printf("\n");
scanf("%d",&k);
}
return 0;
}