#2076: where is wrong?can anyone help me =]


tommybogi (tommy)


#include<iostream>
using namespace std;
int main(){
    double a1, a2, b1, b2, x, y;
    while(cin>>a1>>a2>>b1>>b2){
    y=(((b2-b1)*a1)+(a1-a2)*b1)/a1-a2;
    x=(b2-b1)/(a1-a2);\
    cout<<x<<endl;
    cout<<y<<endl;
    }
    return 0;
}
#4767: Re:where is wrong?can anyone help me =]


kunkun123 (kun)


#include<iostream>
using namespace std;
int main(){
    double a1, a2, b1, b2, x, y;
    while(cin>>a1>>a2>>b1>>b2){
    y=(((b2-b1)*a1)+(a1-a2)*b1)/(a1-a2);
    x=(b2-b1)/(a1-a2);
    cout<<x<<endl;
    cout<<y<<endl;
    }
    return 0;
}