Advertisement
DatProgrammer

X04437

Oct 10th, 2015
678
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. double dist_or(double x, double y) {
  6.  
  7.   double r;
  8.   r = sqrt((x*x)+(y*y));  
  9.   return r;
  10. }
  11.  
  12. int main() {
  13.  
  14.   double a, b, d;
  15.   cin >> a >> b;
  16.  
  17.   d = dist_or(a,b);
  18.   cout << d << endl;
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement