daily pastebin goal
41%
SHARE
TWEET

xd

a guest Jan 22nd, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <fstream>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     ifstream plik ("trojkaty.txt");
  10.  
  11.     double x1,y1,x2,y2,x3,y3;
  12.     while (!plik.eof())
  13. {
  14.     plik>>x1>>y1>>x2>>y2>>x3>>y3;
  15.     cout<<"Odleglosc miedzy punktami A = ("<<x1<<", "<<x2<<"), B = ("<<x2<<", "<<y2<<") wynosi: "
  16.     <<sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1))<<endl;
  17. }
  18.     return 0;
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top