AOJ 0004 Simultaneous Equation

問題 http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004

計算ミスさえなければ。。。

int main(void){
   int a,b,c,d,e,f;
   double x,y,i,j,k;
   while(cin >> a >> b >> c >> d >> e >> f){
      /*ax + by = c
        dx + ey = f*/
      y = (double)(c*d - a*f)/(b*d-a*e);
      x = (double)(c-b*y)/a;
      i = x*1000;
      i = (int)round(i);
      i = (double)(i)/1000;
      j = y*1000;
      j = (int)round(j);
      j = (double)(j)/1000;
      cout << fixed << setprecision(3) << i <<" " <<j << endl;
   }
}