class tax08{
public static void main(String args[]){
int s1,s2;
double u1,c1,x1,x2;
double th1[]=new double[11];
double th2[]=new double[11];
for (s1=1;s1<11;s1++){
th1[s1]=0.2*s1;
}
for (s2=1;s2<11;s2++){
th2[s2]=0.1*s2;
}
c1=0.5;
x1=0.5;
x2=0.5;
u1=u(c1,x1,x2);
}
public static double u(double c1,double x1,double x2){
double u1,c2,x3,x4;
int h;
c2=c1;
x3=x1;
x4=x2;
h=0;
if (c2<0)h=100;
if (c2==0)h=100;
if (x3<0)h=100;
if (x3==0)h=100;
if (x3>1)h=100;
if (x4<0)h=100;
if (x4==0)h=100;
if (x4>1)h=100;
if (h>50)c2=0.5;
if (h>50)x3=0.5;
if (h>50)x4=0.5;
u1=Math.log(c2)+Math.log(x3)+Math.log(x4);
if (h>50)u1=-999;
return u1;
}
}
最終更新:2010年05月08日 03:21