package memo;
public class pro {
double x,y,w,d;
double ex,im,c;
double alpha,beta,theta;
double gamma;
double ys,ims,xs;
double cs;
double yp,ip,xp;
public static void main(String[] args) {
pro test=new pro();
}
pro(){
x=50;
y=100;
w=30;
d=20;
ex=20;
im=10;
c=40;
alpha=x/y;
beta=w/y;
theta=d/y;
gamma=im/(c+x);
cs=50;
ys=y;
ims=im;
xs=x;
int t;
t=0;
while(t<50){
step();
t=t+1;
}
System.out.println(ys);
}
void step(){
double xp,imp,yp;
xp=alpha*ys;
imp=(cs+xs)*gamma;
yp=xs+cs+ex-ims;
xs=xp;
ims=ip;
ys=yp;
}
}
最終更新:2014年02月01日 21:32