AddO1f

Lab2_2

Oct 11th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include "iostream"
  3. #include "math.h"
  4. #include "conio.h"
  5.  
  6. using namespace std;
  7.  
  8. int _tmain(int argc, _TCHAR* argv[])
  9. {
  10.     double x1,x2,y1,y2,a,b;
  11.     cout << "Enter a:"; cin >> a;
  12.     cout << "Enter b:"; cin >> b;
  13.     cout << "A(x1,y1) x1:"; cin >> x1;
  14.     cout << " y1:"; cin >> y1;
  15.     if (y1==a*x1+b) cout << "A prinadlezhit";
  16.     else cout << "A ne prinadlezhit";
  17.     _getch();
  18.     cout << "B(x2,y2) x2:"; cin >> x2;
  19.     cout << " y2:"; cin >> y2;
  20.     if (y2==a*x2+b) cout << "B prinadlezhit";
  21.     else cout << "B ne prinadlezhit";
  22.     _getch();
  23.     return 0;
  24. }
Add Comment
Please, Sign In to add comment