很多时候,在网上查资料时,有很多知识都是从博客上查到的,这些博主分享的一些东西对我本人有极大的帮助,感谢这些厉害的慷慨的博主的同时,我自己内心的羡慕与崇拜油然而生,我也想成为这样的人。
虽然现在自己还是一个菜鸟,但是我会慢慢升级和成长的。
还有作业没写完,就不多扯其他的了。滚回去写作业了。
上传一个自己写的24点的“扎实”的算法吧!
// 24点2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
#include "math.h"
int main(int argc, char* argv[])
{
//随机取符合条件的四张牌。
float a[4];
char Str[]="output.txt";
FILE *fp=NULL;
if((fp=fopen(Str,"w"))==NULL)
{
printf("Can not build file!\n");
exit(0);
}
srand(time(NULL));//设置随机数种子。
a[0]=float(rand()%13+2);
do
{
a[1]=float(rand()%13+2);
}while(a[0]==a[1]);
do
{
a[2]=float(rand()%13+2);
}while(a[0]==a[2]||a[2]==a[1]);
do
{
a[3]=float(rand()%13+2);
}while(a[0]==a[3]||a[3]==a[1]||a[3]==a[2]);
//为数排序
for(int i=3;i>=0;i--)
{
for(int j=i-1;j>=0;j--)
if(a[i]>a[j])
{
float k=a[j];
a[j]=a[i];
a[i]=k;
}
}
fprintf(fp,"%g %g %g %g\n",a[0],a[1],a[2],a[3]);
fclose(fp);
if(fclose(fp)==NULL)
printf("error!Can not close file!!\n");
//写入计算24点的方法
if((fp=fopen(Str,"a"))==NULL)
{
printf("Can not build file!\n");
exit(0);
}
//仅加减
if(a[0]+a[1]+a[2]+a[3]==24)
fprintf(fp,"%g+%g+%g+%g=24\t",a[0],a[1],a[2],a[3]);
if(a[0]+a[1]+a[2]-a[3]==24)
fprintf(fp,"%g+%g+%g-%g=24\t",a[0],a[1],a[2],a[3]);
if(a[0]+a[1]-a[2]+a[3]==24)
fprintf(fp,"%g+%g-%g+%g=24\t",a[0],a[1],a[2],a[3]);
if(a[0]-a[1]+a[2]+a[3]==24)
fprintf(fp,"%g-%g+%g+%g=24\t",a[0],a[1],a[2],a[3]);
if(a[0]+a[1]-a[2]-a[3]==24)
fprintf(fp,"%g+%g-%g-%g=24\t",a[0],a[1],a[2],a[3]);
if(a[0]-a[1]+a[2]-a[3]==24)
fprintf(fp,"%g-%g+%g-%g=24\t",a[0],a[1],a[2],a[3]);
if(a[0]-a[1]-a[2]+a[3]==24)
fprintf(fp,"%g-%g-%g+%g=24\t",a[0],a[1],a[2],a[3]);
//仅乘除
if(fabs((a[0]*a[1]*a[2]*a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[1]*a[2]*a[3]/a[0])-24)<=0.0001)
fprintf(fp,"%g*%g*%g/%g=24\t",a[1],a[2],a[3],a[0]);
if(fabs((a[0]/a[1]*a[2]*a[3])-24)<=0.0001)
fprintf(fp,"%g/%g*%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]*a[1]/a[2]*a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]*a[1]*a[2]/a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*%g/%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[1]/a[2]*a[3]/a[0])-24)<=0.0001)
fprintf(fp,"%g/%g*%g/%g=24\t",a[1],a[2],a[3],a[0]);
if(fabs((a[1]*a[2]/a[3]/a[0])-24)<=0.0001)
fprintf(fp,"%g*%g/%g/%g=24\t",a[1],a[2],a[3],a[0]);
if(fabs((a[2]*a[3]/a[0]/a[1])-24)<=0.0001)
fprintf(fp,"%g*%g/%g/%g=24\t",a[2],a[3],a[0],a[1]);
if(fabs((a[2]/a[3]*a[0]/a[1])-24)<=0.0001)
fprintf(fp,"%g/%g*%g/%g=24\t",a[2],a[3],a[0],a[1]);
if(fabs((a[0]/a[1]/a[2]*a[3])-24)<=0.0001)
fprintf(fp,"%g/%g/%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]*a[1]/a[2]/a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/%g/%g=24\t",a[0],a[1],a[2],a[3]);
//一个二级运算无括号
if(fabs((a[0]/a[1]+a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g/%g+%g-%g=24\t",a[0],a[1],a[2],a[3]);//1
if(fabs((a[0]/a[2]+a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g/%g+%g-%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]/a[3]+a[1]-a[2])-24)<=0.0001)
fprintf(fp,"%g/%g+%g-%g=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[1]/a[2]+a[0]-a[3])-24)<=0.0001)
fprintf(fp,"%g/%g+%g-%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]/a[3]+a[0]-a[2])-24)<=0.0001)
fprintf(fp,"%g/%g+%g-%g=24\t",a[1],a[3],a[0],a[2]);
if(fabs((a[2]/a[3]+a[0]-a[1])-24)<=0.0001)
fprintf(fp,"%g/%g+%g-%g=24\t",a[2],a[3],a[0],a[1]);
if(fabs((a[0]/a[1]+a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g/%g+%g+%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]/a[2]+a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g/%g+%g+%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]/a[3]+a[1]+a[2])-24)<=0.0001)
fprintf(fp,"%g/%g+%g+%g=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[1]/a[2]+a[0]+a[3])-24)<=0.0001)
fprintf(fp,"%g/%g+%g+%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]/a[3]+a[0]+a[2])-24)<=0.0001)
fprintf(fp,"%g/%g+%g+%g=24\t",a[1],a[3],a[0],a[2]);
if(fabs((a[2]/a[3]+a[0]+a[1])-24)<=0.0001)
fprintf(fp,"%g/%g+%g+%g=24\t",a[2],a[3],a[0],a[1]);
if(fabs((a[0]*a[1]-a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g-%g-%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]*a[2]-a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g-%g-%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]*a[3]-a[2]-a[1])-24)<=0.0001)
fprintf(fp,"%g*%g-%g-%g=24\t",a[0],a[3],a[2],a[1]);
if(fabs((a[1]*a[2]-a[0]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g-%g-%g=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[1]*a[3]-a[0]-a[2])-24)<=0.0001)
fprintf(fp,"%g*%g-%g-%g=24\t",a[1],a[3],a[0],a[2]);//17
if(fabs((a[3]*a[2]-a[1]-a[0])-24)<=0.0001)
fprintf(fp,"%g*%g-%g-%g=24\t",a[3],a[2],a[0],a[1]);
if(fabs((a[0]*a[1]+a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g+%g+%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]*a[2]+a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g+%g+%g=24\t",a[0],a[2],a[1],a[3]);//
if(fabs((a[0]*a[3]+a[2]+a[1])-24)<=0.0001)
fprintf(fp,"%g*%g+%g+%g=24\t",a[0],a[3],a[2],a[1]);
if(fabs((a[1]*a[2]+a[0]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g+%g+%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]*a[3]+a[2]+a[0])-24)<=0.0001)
fprintf(fp,"%g*%g+%g+%g=24\t",a[1],a[3],a[2],a[0]);
if(fabs((a[2]*a[3]+a[0]+a[1])-24)<=0.0001)
fprintf(fp,"%g*%g+%g+%g=24\t",a[2],a[3],a[0],a[1]);
if(fabs((a[0]*a[1]+a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]*a[1]+a[3]-a[2])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[0],a[1],a[3],a[2]);//26
if(fabs((a[0]*a[2]+a[3]-a[1])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[0],a[2],a[3],a[1]);
if(fabs((a[0]*a[2]+a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]*a[3]+a[1]-a[2])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[0]*a[3]+a[2]-a[1])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[0],a[3],a[2],a[1]);
if(fabs((a[1]*a[2]+a[0]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]*a[2]+a[3]-a[0])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[1],a[2],a[3],a[0]);
if(fabs((a[1]*a[3]+a[0]-a[2])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[1],a[3],a[0],a[2]);
if(fabs((a[1]*a[3]+a[2]-a[0])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[1],a[3],a[2],a[0]);//35
if(fabs((a[2]*a[3]+a[1]-a[0])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[2],a[3],a[1],a[0]);
if(fabs((a[2]*a[3]+a[0]-a[1])-24)<=0.0001)
fprintf(fp,"%g*%g+%g-%g=24\t",a[2],a[3],a[0],a[1]);//36
if(fabs((a[0]+a[1]-a[2]/a[3])-24)<=0.0001)
fprintf(fp,"%g+%g-%g/%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]+a[1]-a[2]*a[3])-24)<=0.0001)
fprintf(fp,"%g+%g-%g*%g=24\t",a[0],a[1],a[2],a[3]);//38完一个二级运算无括号
//一个二级运算一括号
if(fabs((a[0]+a[1]*(a[2]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[0],a[1],a[2],a[3]);//1
if(fabs((a[0]+a[2]*(a[1]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]+a[3]*(a[1]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[1]+a[0]*(a[2]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs((a[2]+a[0]*(a[1]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs((a[3]+a[0]*(a[1]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[3],a[0],a[1],a[2]);//6
//
if(fabs((a[0]+a[1]*(a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]+a[2]*(a[1]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]+a[3]*(a[1]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[1]+a[0]*(a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs((a[2]+a[0]*(a[1]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs((a[3]+a[0]*(a[1]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[3],a[0],a[1],a[2]);//12
//
if(fabs((a[1]+a[2]*(a[0]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]+a[3]*(a[0]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[1],a[3],a[0],a[2]);//
if(fabs((a[2]+a[1]*(a[0]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[3]+a[1]*(a[0]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[3],a[1],a[0],a[2]);//
if(fabs((a[2]+a[1]*(a[0]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[3]+a[1]*(a[0]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[3],a[1],a[0],a[2]);//
if(fabs((a[1]+a[2]*(a[0]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]+a[3]*(a[0]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[1],a[3],a[0],a[2]);//20
//
if(fabs((a[3]+a[2]*(a[0]-a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[3],a[2],a[0],a[1]);
if(fabs((a[2]+a[3]*(a[0]-a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g-%g)=24\t",a[2],a[3],a[0],a[1]);
if(fabs((a[3]+a[2]*(a[0]+a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[3],a[2],a[0],a[1]);
if(fabs((a[2]+a[3]*(a[0]+a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g*(%g+%g)=24\t",a[2],a[3],a[0],a[1]);//24
if(fabs((a[0]+a[1]/(a[2]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]+a[2]/(a[1]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]+a[3]/(a[1]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[1]+a[0]/(a[2]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs((a[2]+a[0]/(a[1]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs((a[3]+a[0]/(a[1]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[3],a[0],a[1],a[2]);//30
//
if(fabs((a[0]+a[1]/(a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]+a[2]/(a[1]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]+a[3]/(a[1]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[1]+a[0]/(a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs((a[2]+a[0]/(a[1]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs((a[3]+a[0]/(a[1]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[3],a[0],a[1],a[2]);//36
//
if(fabs((a[1]+a[2]/(a[0]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]+a[3]/(a[0]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[1],a[3],a[0],a[2]);//
if(fabs((a[2]+a[1]/(a[0]+a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[3]+a[1]/(a[0]+a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[3],a[1],a[0],a[2]);//
if(fabs((a[2]+a[1]/(a[0]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[3]+a[1]/(a[0]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[3],a[1],a[0],a[2]);//
if(fabs((a[1]+a[2]/(a[0]-a[3]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs((a[1]+a[3]/(a[0]-a[2]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[1],a[3],a[0],a[2]);//44
if(fabs((a[3]+a[2]/(a[0]-a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[3],a[2],a[0],a[1]);
if(fabs((a[2]+a[3]/(a[0]-a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g-%g)=24\t",a[2],a[3],a[0],a[1]);
if(fabs((a[3]+a[2]/(a[0]+a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[3],a[2],a[0],a[1]);
if(fabs((a[2]+a[3]/(a[0]+a[1]))-24)<=0.0001)
fprintf(fp,"%g+%g/(%g+%g)=24\t",a[2],a[3],a[0],a[1]);//48
//
if(fabs((a[1]*(a[2]-a[3])-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[1],a[2],a[3],a[0]);//1
if(fabs((a[2]*(a[1]-a[3])-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[2],a[1],a[3],a[0]);
if(fabs((a[3]*(a[1]-a[2])-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[3],a[1],a[2],a[0]);
if(fabs((a[0]*(a[2]-a[3])-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[0],a[2],a[3],a[1]);
if(fabs((a[0]*(a[1]-a[3])-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[0],a[1],a[3],a[2]);
if(fabs((a[0]*(a[1]-a[2])-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[0],a[1],a[2],a[3]);//6
//
if(fabs((a[1]*(a[2]+a[3])-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[1],a[2],a[3],a[0]);
if(fabs((a[2]*(a[1]+a[3])-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[2],a[1],a[3],a[0]);
if(fabs((a[3]*(a[1]+a[2])-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[3],a[1],a[2],a[0]);
if(fabs((a[0]*(a[2]+a[3])-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[0],a[2],a[3],a[1]);
if(fabs((a[0]*(a[1]+a[3])-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[0],a[1],a[3],a[2]);
if(fabs((a[0]*(a[1]+a[2])-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[0],a[1],a[2],a[3]);//12
//
if(fabs((a[2]*(a[0]+a[3])-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[2],a[0],a[3],a[1]);//
if(fabs((a[3]*(a[0]+a[2])-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[3],a[0],a[2],a[1]);//
if(fabs((a[1]*(a[0]+a[3])-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[1],a[0],a[3],a[2]);
if(fabs((a[1]*(a[0]+a[2])-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[1],a[0],a[2],a[3]);//
if(fabs((a[1]*(a[0]-a[3])-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[1],a[0],a[3],a[2]);
if(fabs((a[1]*(a[0]-a[2])-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[1],a[0],a[2],a[3]);//
if(fabs((a[2]*(a[0]-a[3])-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[2],a[0],a[3],a[1]);
if(fabs((a[3]*(a[0]-a[2])-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[3],a[0],a[2],a[1]);//20
//
if(fabs((a[2]*(a[0]-a[1])-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[2],a[0],a[1],a[3]);
if(fabs((a[3]*(a[0]-a[1])-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g)-%g=24\t",a[3],a[0],a[1],a[2]);
if(fabs((a[2]*(a[0]+a[1])-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[2],a[0],a[1],a[3]);
if(fabs((a[3]*(a[0]+a[1])-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g+%g)-%g=24\t",a[3],a[0],a[1],a[2]);//24+48=72
if(fabs((a[0]*(a[1]+a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[1]*(a[0]+a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g+%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs((a[2]*(a[1]+a[0]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g+%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[3]*(a[1]+a[2]+a[0]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g+%g)=24\t",a[3],a[1],a[2],a[0]);
if(fabs((a[0]*(a[1]+a[2]-a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g-%g)=24\t",a[0],a[1],a[2],a[3]);//
if(fabs((a[0]*(a[1]-a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]*(-a[1]+a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(-%g+%g+%g)=24\t",a[0],a[1],a[2],a[3]);//
if(fabs((a[1]*(a[3]+a[2]-a[0]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g-%g)=24\t",a[1],a[3],a[2],a[0]);
if(fabs((a[1]*(a[0]-a[2]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g+%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs((a[1]*(-a[3]+a[2]+a[0]))-24)<=0.0001)
fprintf(fp,"%g*(-%g+%g+%g)=24\t",a[1],a[3],a[2],a[0]);//
if(fabs((a[2]*(a[1]+a[0]-a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g-%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[2]*(a[1]-a[0]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g+%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs((a[2]*(-a[1]+a[0]+a[3]))-24)<=0.0001)
fprintf(fp,"%g*(-%g+%g+%g)=24\t",a[2],a[1],a[0],a[3]);//
if(fabs((a[3]*(a[1]+a[2]-a[0]))-24)<=0.0001)
fprintf(fp,"%g*(%g+%g-%g)=24\t",a[3],a[1],a[2],a[0]);
if(fabs((a[3]*(a[1]-a[2]+a[0]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g+%g)=24\t",a[3],a[1],a[2],a[0]);
if(fabs((a[3]*(-a[1]+a[2]+a[0]))-24)<=0.0001)
fprintf(fp,"%g*(-%g+%g+%g)=24\t",a[3],a[1],a[2],a[0]);//72+16
if(fabs((a[0]*(a[1]-a[2]-a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[1]*(a[0]-a[2]-a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g-%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs((a[2]*(a[0]-a[1]-a[3]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g-%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs((a[3]*(a[0]-a[2]-a[1]))-24)<=0.0001)
fprintf(fp,"%g*(%g-%g-%g)=24\t",a[3],a[0],a[2],a[1]);//72+20
//一个二级运算二括号
if(fabs((a[0]+a[1])*(a[2]+a[3])-24)<=0.0001)
fprintf(fp,"(%g+%g)*(%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]+a[1])*(a[2]-a[3])-24)<=0.0001)
fprintf(fp,"(%g+%g)*(%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]-a[1])*(a[2]+a[3])-24)<=0.0001)
fprintf(fp,"(%g-%g)*(%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]-a[1])*(a[2]-a[3])-24)<=0.0001)
fprintf(fp,"(%g-%g)*(%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs((a[0]-a[2])*(a[1]-a[3])-24)<=0.0001)
fprintf(fp,"(%g-%g)*(%g-%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]+a[2])*(a[1]-a[3])-24)<=0.0001)
fprintf(fp,"(%g+%g)*(%g-%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]+a[2])*(a[1]+a[3])-24)<=0.0001)
fprintf(fp,"(%g+%g)*(%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]-a[2])*(a[1]+a[3])-24)<=0.0001)
fprintf(fp,"(%g-%g)*(%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs((a[0]-a[3])*(a[1]-a[2])-24)<=0.0001)
fprintf(fp,"(%g-%g)*(%g-%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[0]+a[3])*(a[1]-a[2])-24)<=0.0001)
fprintf(fp,"(%g+%g)*(%g-%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[0]+a[3])*(a[1]+a[2])-24)<=0.0001)
fprintf(fp,"(%g+%g)*(%g+%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs((a[0]-a[3])*(a[1]+a[2])-24)<=0.0001)
fprintf(fp,"(%g-%g)*(%g+%g)=24\t",a[0],a[3],a[1],a[2]);//12
//二个二级运算无括号
if(fabs(a[0]/a[1]+a[2]*a[3]-24)<=0.0001)
fprintf(fp,"%g/%g+%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]/a[2]+a[1]*a[3]-24)<=0.0001)
fprintf(fp,"%g/%g+%g*%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]/a[3]+a[2]*a[1]-24)<=0.0001)
fprintf(fp,"%g/%g+%g*%g=24\t",a[0],a[3],a[2],a[1]);
if(fabs(a[1]/a[2]+a[0]*a[3]-24)<=0.0001)
fprintf(fp,"%g/%g+%g*%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]/a[3]+a[2]*a[0]-24)<=0.0001)
fprintf(fp,"%g/%g+%g*%g=24\t",a[1],a[3],a[2],a[0]);
if(fabs(a[2]/a[3]+a[0]*a[1]-24)<=0.0001)
fprintf(fp,"%g/%g+%g*%g=24\t",a[2],a[3],a[0],a[1]);//6
if(fabs(a[0]*a[1]+a[2]*a[3]-24)<=0.0001)
fprintf(fp,"%g*%g+%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*a[2]+a[1]*a[3]-24)<=0.0001)
fprintf(fp,"%g*%g+%g*%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[3]+a[2]*a[1]-24)<=0.0001)
fprintf(fp,"%g*%g+%g*%g=24\t",a[0],a[3],a[2],a[1]);
if(fabs(a[1]*a[2]+a[0]*a[3]-24)<=0.0001)
fprintf(fp,"%g*%g+%g*%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*a[3]+a[2]*a[0]-24)<=0.0001)
fprintf(fp,"%g*%g+%g*%g=24\t",a[1],a[3],a[2],a[0]);
if(fabs(a[2]*a[3]+a[0]*a[1]-24)<=0.0001)
fprintf(fp,"%g/%g+%g*%g=24\t",a[2],a[3],a[0],a[1]);//6*2
if(fabs(a[0]*a[1]-a[2]*a[3]-24)<=0.0001)
fprintf(fp,"%g*%g-%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*a[2]-a[1]*a[3]-24)<=0.0001)
fprintf(fp,"%g*%g-%g*%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[3]-a[2]*a[1]-24)<=0.0001)
fprintf(fp,"%g*%g-%g*%g=24\t",a[0],a[3],a[2],a[1]);
if(fabs(a[1]*a[2]-a[0]*a[3]-24)<=0.0001)
fprintf(fp,"%g*%g-%g*%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*a[3]-a[2]*a[0]-24)<=0.0001)
fprintf(fp,"%g*%g-%g*%g=24\t",a[1],a[3],a[2],a[0]);//6*2+5
if(fabs(a[0]*a[1]-a[2]/a[3]-24)<=0.0001)
fprintf(fp,"%g*%g-%g/%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*a[2]-a[1]/a[3]-24)<=0.0001)
fprintf(fp,"%g*%g-%g/%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[3]-a[1]/a[2]-24)<=0.0001)
fprintf(fp,"%g*%g-%g/%g=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[1]*a[2]-a[0]/a[3]-24)<=0.0001)
fprintf(fp,"%g*%g-%g/%g=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*a[3]-a[0]/a[2]-24)<=0.0001)
fprintf(fp,"%g*%g-%g/%g=24\t",a[1],a[3],a[0],a[2]);
if(fabs(a[2]*a[3]-a[0]/a[1]-24)<=0.0001)
fprintf(fp,"%g*%g-%g/%g=24\t",a[2],a[3],a[0],a[1]);//6*3+5
if(fabs(a[0]+a[1]*a[2]*a[3]-24)<=0.0001)
fprintf(fp,"%g+%g*%g*%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[1]+a[0]*a[2]*a[3]-24)<=0.0001)
fprintf(fp,"%g+%g*%g*%g=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[2]+a[1]*a[0]*a[3]-24)<=0.0001)
fprintf(fp,"%g+%g*%g*%g=24\t",a[2],a[1],a[0],a[3]);
if(fabs(a[3]+a[1]*a[2]*a[0]-24)<=0.0001)
fprintf(fp,"%g+%g*%g*%g=24\t",a[3],a[1],a[2],a[0]);//4
if(fabs(a[0]+a[1]*a[2]/a[3]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]+a[1]*a[3]/a[2]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[0],a[1],a[3],a[2]);
if(fabs(a[0]+a[3]*a[2]/a[1]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[0],a[3],a[2],a[1]);//3
if(fabs(a[1]+a[3]*a[2]/a[0]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[1],a[3],a[2],a[0]);
if(fabs(a[1]+a[0]*a[3]/a[2]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[1],a[0],a[3],a[2]);
if(fabs(a[1]+a[0]*a[2]/a[3]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[1],a[0],a[2],a[3]);//3
if(fabs(a[2]+a[0]*a[2]/a[3]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[2],a[0],a[2],a[3]);
if(fabs(a[2]+a[0]*a[3]/a[1]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[2],a[0],a[3],a[1]);
if(fabs(a[2]+a[3]*a[1]/a[0]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[2],a[3],a[1],a[0]);//3
if(fabs(a[3]+a[0]*a[2]/a[1]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[3],a[0],a[2],a[1]);
if(fabs(a[3]+a[0]*a[1]/a[2]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[3],a[0],a[1],a[2]);
if(fabs(a[3]+a[1]*a[2]/a[0]-24)<=0.0001)
fprintf(fp,"%g+%g*%g/%g=24\t",a[3],a[1],a[2],a[0]);//共16//
if(fabs(a[1]*a[2]*a[3]-a[0]-24)<=0.0001)
fprintf(fp,"%g*%g*%g%g-=24\t",a[1],a[2],a[3],a[0]);
if(fabs(a[0]*a[2]*a[3]-a[1]-24)<=0.0001)
fprintf(fp,"%g*%g*%g-%g=24\t",a[0],a[2],a[3],a[1]);
if(fabs(a[1]*a[0]*a[3]-a[2]-24)<=0.0001)
fprintf(fp,"%g*%g*%g-%g=24\t",a[1],a[0],a[3],a[2]);
if(fabs(a[1]*a[2]*a[0]-a[3]-24)<=0.0001)
fprintf(fp,"%g*%g*%g-%g=24\t",a[1],a[2],a[0],a[3]);//4
if(fabs(a[1]*a[2]/a[3]-a[0]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[1],a[2],a[3],a[0]);
if(fabs(a[1]*a[3]/a[2]-a[0]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[1],a[3],a[2],a[0]);
if(fabs(a[3]*a[2]/a[1]-a[0]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[3],a[2],a[1],a[0]);//3
if(fabs(a[3]*a[2]/a[0]-a[1]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[3],a[2],a[0],a[1]);
if(fabs(a[0]*a[3]/a[2]-a[1]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[0],a[3],a[2],a[1]);
if(fabs(a[0]*a[2]/a[3]-a[1]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[0],a[2],a[3],a[1]);//3
if(fabs(a[0]*a[2]/a[3]-a[2]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[0],a[2],a[3],a[2]);
if(fabs(a[0]*a[3]/a[1]-a[2]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[3]*a[1]/a[0]-a[2]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[3],a[1],a[0],a[2]);//3
if(fabs(a[0]*a[2]/a[1]-a[3]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[1]/a[2]-a[3]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[1]*a[2]/a[0]-a[3]-24)<=0.0001)
fprintf(fp,"%g*%g/%g-%g=24\t",a[1],a[2],a[0],a[3]);
//二个二级运算一括号
if(fabs(a[0]*a[1]*(a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*a[2]*(a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[3]*(a[1]+a[2])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g+%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[1]*a[2]*(a[0]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g+%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*a[3]*(a[2]+a[0])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g+%g)=24\t",a[1],a[3],a[2],a[0]);
if(fabs(a[2]*a[3]*(a[0]+a[1])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g+%g)=24\t",a[2],a[3],a[0],a[1]);//c
if(fabs(a[0]*a[1]/(a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*a[2]/(a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[3]/(a[1]+a[2])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g+%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[1]*a[2]/(a[0]+a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g+%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*a[3]/(a[0]+a[2])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g+%g)=24\t",a[1],a[3],a[0],a[2]);
if(fabs(a[2]*a[3]/(a[0]+a[1])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g+%g)=24\t",a[2],a[3],a[0],a[1]);//cc
if(fabs(a[0]/a[1]*(a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]/a[2]*(a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]/a[3]*(a[1]+a[2])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g+%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[1]/a[2]*(a[0]+a[3])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g+%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]/a[3]*(a[0]+a[2])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g+%g)=24\t",a[1],a[3],a[0],a[2]);
if(fabs(a[2]/a[3]*(a[0]+a[1])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g+%g)=24\t",a[2],a[3],a[0],a[1]);/
if(fabs(a[0]*a[1]*(a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*a[2]*(a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g-%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[3]*(a[1]-a[2])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g-%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[1]*a[2]*(a[0]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g-%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*a[3]*(a[2]-a[0])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g-%g)=24\t",a[1],a[3],a[2],a[0]);
if(fabs(a[2]*a[3]*(a[0]-a[1])-24)<=0.0001)
fprintf(fp,"%g*%g*(%g-%g)=24\t",a[2],a[3],a[0],a[1]);//c
if(fabs(a[0]*a[1]/(a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*a[2]/(a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g-%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*a[3]/(a[1]-a[2])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g-%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[1]*a[2]/(a[0]-a[3])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g-%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*a[3]/(a[0]-a[2])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g-%g)=24\t",a[1],a[3],a[0],a[2]);
if(fabs(a[2]*a[3]/(a[0]-a[1])-24)<=0.0001)
fprintf(fp,"%g*%g/(%g-%g)=24\t",a[2],a[3],a[0],a[1]);//cc
if(fabs(a[0]/a[1]*(a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]/a[2]*(a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g-%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]/a[3]*(a[1]-a[2])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g-%g)=24\t",a[0],a[3],a[1],a[2]);
if(fabs(a[1]/a[2]*(a[0]-a[3])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g-%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]/a[3]*(a[0]-a[2])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g-%g)=24\t",a[1],a[3],a[0],a[2]);
if(fabs(a[2]/a[3]*(a[0]-a[1])-24)<=0.0001)
fprintf(fp,"%g/%g*(%g-%g)=24\t",a[2],a[3],a[0],a[1]);//
if(fabs(a[0]*(a[1]*a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*(a[1]*a[3]-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[0],a[1],a[3],a[2]);
if(fabs(a[0]*(a[2]*a[3]-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[0],a[2],a[3],a[1]);
if(fabs(a[1]*(a[0]*a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[1]*(a[0]*a[3]-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[1],a[0],a[3],a[2]);
if(fabs(a[1]*(a[2]*a[3]-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[2]*(a[0]*a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs(a[2]*(a[0]*a[3]-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[2],a[0],a[3],a[1]);
if(fabs(a[2]*(a[1]*a[3]-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[2],a[1],a[3],a[0]);
if(fabs(a[3]*(a[0]*a[1]-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[3],a[0],a[1],a[2]);
if(fabs(a[3]*(a[0]*a[2]-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[3],a[0],a[2],a[1]);
if(fabs(a[3]*(a[1]*a[2]-a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g-%g)=24\t",a[3],a[1],a[2],a[0]);
if(fabs(a[0]*(a[1]*a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*(a[1]*a[3]+a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[0],a[1],a[3],a[2]);
if(fabs(a[0]*(a[2]*a[3]+a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[0],a[2],a[3],a[1]);
if(fabs(a[1]*(a[0]*a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[1]*(a[0]*a[3]+a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[1],a[0],a[3],a[2]);
if(fabs(a[1]*(a[2]*a[3]+a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[2]*(a[0]*a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs(a[2]*(a[0]*a[3]+a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[2],a[0],a[3],a[1]);
if(fabs(a[2]*(a[1]*a[3]+a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[2],a[1],a[3],a[0]);
if(fabs(a[3]*(a[0]*a[1]+a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[3],a[0],a[1],a[2]);
if(fabs(a[3]*(a[0]*a[2]+a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[3],a[0],a[2],a[1]);
if(fabs(a[3]*(a[1]*a[2]+a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g*%g+%g)=24\t",a[3],a[1],a[2],a[0]);/
if(fabs(a[0]*(a[1]-a[3]*a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g*%g)=24\t",a[0],a[1],a[3],a[2]);
if(fabs(a[1]*(a[0]-a[3]*a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g*%g)=24\t",a[1],a[0],a[3],a[2]);/
if(fabs(a[0]*(a[1]/a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g-%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*(a[1]/a[3]-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g-%g)=24\t",a[0],a[1],a[3],a[2]);
if(fabs(a[0]*(a[1]/a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*(a[1]/a[3]+a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[0],a[1],a[3],a[2]);//
if(fabs(a[0]*(a[2]/a[3]+a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[0],a[2],a[3],a[1]);//
if(fabs(a[0]*(a[3]/a[2]+a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[0],a[3],a[2],a[1]);
if(fabs(a[0]*(a[2]/a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*(a[3]/a[1]+a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[0],a[3],a[1],a[2]);//
if(fabs(a[1]*(a[0]/a[2]-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g-%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[1]*(a[0]/a[3]-a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g-%g)=24\t",a[1],a[0],a[3],a[2]);//
if(fabs(a[1]*(a[0]/a[2]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[1]*(a[0]/a[3]+a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[1],a[0],a[3],a[2]);//
if(fabs(a[1]*(a[2]/a[3]+a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[1],a[2],a[3],a[0]);
if(fabs(a[1]*(a[3]/a[2]+a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[1],a[3],a[2],a[0]);
if(fabs(a[1]*(a[3]/a[0]+a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[1],a[3],a[0],a[2]);
if(fabs(a[1]*(a[2]/a[0]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[1],a[2],a[0],a[3]);/
if(fabs(a[2]*(a[0]/a[1]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs(a[2]*(a[0]/a[3]+a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[2],a[0],a[3],a[1]);
if(fabs(a[2]*(a[1]/a[3]+a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[2],a[1],a[3],a[0]);
if(fabs(a[2]*(a[1]/a[0]+a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[2],a[1],a[0],a[3]);
if(fabs(a[2]*(a[3]/a[0]+a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[2],a[1],a[3],a[0]);
if(fabs(a[2]*(a[3]/a[1]+a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g+%g)=24\t",a[2],a[1],a[3],a[0]);
if(fabs(a[2]*(a[0]/a[1]-a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g-%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs(a[2]*(a[0]/a[3]-a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g/%g-%g)=24\t",a[2],a[0],a[3],a[1]);/
if(fabs(a[0]*(a[1]-a[3]*a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g*%g)=24\t",a[0],a[1],a[3],a[2]);
if(fabs(a[1]*(a[0]-a[3]*a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g*%g)=24\t",a[1],a[0],a[3],a[2]);
if(fabs(a[2]*(a[0]-a[3]*a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g*%g)=24\t",a[2],a[0],a[1],a[3]);
if(fabs(a[3]*(a[0]-a[1]*a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g*%g)=24\t",a[3],a[0],a[1],a[2]);
if(fabs(a[0]*(a[1]-a[2]/a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[0],a[1],a[2],a[3]);
if(fabs(a[0]*(a[1]-a[3]/a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[0],a[1],a[3],a[2]);
if(fabs(a[0]*(a[2]-a[1]/a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[0],a[2],a[1],a[3]);
if(fabs(a[0]*(a[2]-a[3]/a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[0],a[2],a[3],a[1]);
if(fabs(a[0]*(a[3]-a[2]/a[1])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[0],a[3],a[2],a[1]);
if(fabs(a[0]*(a[3]-a[1]/a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[0],a[3],a[1],a[2]);//
if(fabs(a[1]*(a[0]-a[2]/a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[1],a[0],a[2],a[3]);
if(fabs(a[1]*(a[0]-a[3]/a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[1],a[0],a[3],a[2]);
if(fabs(a[1]*(a[2]-a[0]/a[3])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[1],a[2],a[0],a[3]);
if(fabs(a[1]*(a[2]-a[3]/a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[1],a[2],a[3],a[0]);
if(fabs(a[1]*(a[3]-a[0]/a[2])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[1],a[3],a[0],a[2]);
if(fabs(a[1]*(a[3]-a[2]/a[0])-24)<=0.0001)
fprintf(fp,"%g*(%g-%g/%g)=24\t",a[1],a[3],a[2],a[0]);
/*for(int i=0;i<=3;i++)
printf("%g %g\n",zjs1[i],a[i]);*/
return 0;
}