Advertisement
MatveyL

kept

Apr 9th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <queue>
  4. #include <math.h>
  5. #include <random>
  6.  
  7. using namespace std;
  8.  
  9.  
  10. int main () {
  11. double x1, y1 , a , b , c , r;
  12.  
  13.  
  14. cin>>x1>>y1>>a>>b>>c;
  15.  
  16. r = (abs(a*x1+b*y1+c))/sqrt(a*a+b*b);
  17. cout<< r << endl;
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement