View Code of Problem 67

#include <iostream>
#include <cstdio>
using namespace std;
int main(){
    double x1,x2,x3,x4;
    double y1,y2,y3,y4;
    double t1,t2;
    while(cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4){
        if(x1!=x2&&x3!=x4){
            t1=(y1-y2)/(x1-x2);
            t2=(y3-y4)/(x3-x4);
            if(t1==t2)
                cout<<"NO"<<endl;
            else
                cout<<"YES"<<endl;
        }
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 67