Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int x1, y1, x2, y2, x3, y3 ;
- double atstumas, atstumas2, atstumas3 ;
- cout << "Iveskite tasko x1 koodrinate" ; cin>>x1 ;
- cout << "Iveskite tasko y1 koodrinate" ; cin>>y1 ;
- cout << "Iveskite tasko x2 koodrinate" ; cin>>x2 ;
- cout << "Iveskite tasko y2 koodrinate" ; cin>>y2 ;
- cout << "Iveskite tasko x3 koodrinate" ; cin>>x3 ;
- cout << "Iveskite tasko y3 koodrinate" ; cin>>y3 ;
- atstumas = sqrt (x1 * x1 + y1 * y1) ;
- atstumas2 = sqrt (x2 * x2 + y2 * y2) ;
- atstumas3 = sqrt (x3 * x3 + y3 * y3) ;
- cout << "aststumas iki koordinaciu (x1;y1) pradzios "
- << setw (6)<<fixed<<setprecision (2)<<atstumas<<endl ;
- cout << "aststumas iki koordinaciu (x2;y2) pradzios "
- << setw (6)<<fixed<<setprecision (2)<<atstumas2<<endl ;
- cout << "aststumas iki koordinaciu (x3;y3) pradzios "
- << setw (6)<<fixed<<setprecision (2)<<atstumas3<<endl ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement