Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int x1, y1, x2, y2, x3, y3 ;
  10. double atstumas, atstumas2, atstumas3 ;
  11. cout << "Iveskite tasko x1 koodrinate" ; cin>>x1 ;
  12. cout << "Iveskite tasko y1 koodrinate" ; cin>>y1 ;
  13. cout << "Iveskite tasko x2 koodrinate" ; cin>>x2 ;
  14. cout << "Iveskite tasko y2 koodrinate" ; cin>>y2 ;
  15. cout << "Iveskite tasko x3 koodrinate" ; cin>>x3 ;
  16. cout << "Iveskite tasko y3 koodrinate" ; cin>>y3 ;
  17. atstumas = sqrt (x1 * x1 + y1 * y1) ;
  18. atstumas2 = sqrt (x2 * x2 + y2 * y2) ;
  19. atstumas3 = sqrt (x3 * x3 + y3 * y3) ;
  20. cout << "aststumas iki koordinaciu (x1;y1) pradzios "
  21. << setw (6)<<fixed<<setprecision (2)<<atstumas<<endl ;
  22. cout << "aststumas iki koordinaciu (x2;y2) pradzios "
  23. << setw (6)<<fixed<<setprecision (2)<<atstumas2<<endl ;
  24. cout << "aststumas iki koordinaciu (x3;y3) pradzios "
  25. << setw (6)<<fixed<<setprecision (2)<<atstumas3<<endl ;
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement