package d2;
public class pro {
int sx,number;
int[] year=new int[500];
String[] v=new String[500];
int[] month=new int[500];
int[] yy=new int[500];
int[] mm=new int[500];
int datanumber;
String[] ex=new String[500];
double[] c=new double[500];
double[] c2=new double[500];
double[] c3=new double[500];
double[] sol=new double[500];
double[][] x=new double[1000][10];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
String db,tab;
db="gdp";
tab="gdp";
int b1,s;
String c1;
select_gdp sub=new select_gdp();
sub.makedata(db,tab,"jk","c3");
number=sub.number;
ex=sub.v;
year=sub.year;
month=sub.month;
for(s=1;s<number+1;s++){
c[s]=num(ex[s]);
}
db="cons";
tab="cons";
select sub2=new select();
sub2.makedata(db,tab);
datanumber=sub2.number;
ex=sub2.v;
yy=sub2.year;
mm=sub2.month;
for(s=1;s<86;s++){
c3[s]=0;
}
for(s=1;s<datanumber+1;s++){
c2[s]=num(ex[s]);
int n1=4*(yy[s]-1994);
int m1=(mm[s]-1)/3+1;
int s1=n1+m1;
c3[s1]=c3[s1]+c2[s];
}
for(s=1;s<86;s++){
x[s][1]=1;
x[s][2]=c3[s];
}
ols sub3=new ols();
sub3.datanumber=85;
sub3.number=2;
sub3.x=x;
sub3.y=c;
sub3.makedata();
sol=sub3.sol;
for(s=1;s<86;s++){
System.out.println(year[s]+"年"+month[s]+"期,"+(sol[1]+sol[2]*c3[s])+","+c[s]);
}
}
int numx(String str){
int nx;
nx=0;
try{
nx=Integer.parseInt(str);
}catch (Exception e) {}
return nx;
}
double num(String str){
double nx;
nx=0;
try{
nx=Double.parseDouble(str);
}catch (Exception e) {}
return nx;
}
}
最終更新:2015年08月12日 00:58