一电脑编程,急,在线等。

来源:百度知道 编辑:UC知道 时间:2024/06/05 23:50:49
92.4≥(x1*x3)/(x2*x4)*54.95≥91.6,X1、X2、X3、X4分别是多少?只允许有以下数值(73、72、66、64、60、59、56、49、43、42、41),且数值不能重复。
以上数值为一机床的设置,请各位高手给予解答,谢谢!

兄弟我只会c++
#include<iostream.h>
void main()
{
int x[11]={73,72,66,64,60,59,56,49,43,42,41};
int x1,x2,x3,x4;
double a=92.4/54.95;
double b=91.6/54.95;
for(int i=0;i<=10;i++)
{
x1=x[i];
for(int m=0;m<=10;m++)
{
x2=x[m];
if(x2==x1)
continue;
for(int n=0;n<=10;n++)
{
x3=x[n];
if(x3==x1||x3==x2)
continue;
for(int j=0;j<=10;j++)
{
x4=x[j];
if(x4==x1||x4==x2||x4==x3)
continue;
if((x1*x3)/(x2*x4)<=a&&((x1*x3)/(x2*x4)>=b))
cout<<"x1="<<x1<<endl<<"x2="<<x2<<endl<<
"x3="<<x3<<endl<<"x4="<<x4<<endl;
}
}
}
}
}

x1 = 73, x2 = 64, x3 = 72, x4 = 49

73 64 72 49
73 64 60 41
73