Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- /* run this program using the console pauser or add your own getch, system("pause") or input loop */
- int main(int argc, char** argv) {
- float a1,a2,b1,b2,c1,c2,w,wx,wy,x,y;
- cout<<"podaj a1,b1,c1"<<endl;
- cin>>a1;
- cin>>b1;
- cin>>c1;
- cout<<"podaj a2,b2,c2"<<endl;
- cin>>a2;
- cin>>b2;
- cin>>c2;
- cout<<"Równanie ma postać"<<endl;
- cout<<a1<<"x"<<"+"<<b1<<"y"<<"="<<c1<<endl;
- cout<<a2<<"x"<<"+"<<b2<<"y"<<"="<<c2<<endl;
- w=(a1*b2) - (a2*b1);
- wx=(c1*b2)-(c2*b1);
- wy=(a1*c2)-(a2*c1);
- cout<<"W="<<w<<endl;
- cout<<"Wx="<<wx<<endl;
- cout<<"Wy="<<wy<<endl;
- // if (w=!0)
- { x=wx/w;
- y=wy/w;
- cout<<x<<endl;
- cout<<y<<endl;}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement