2 na uni

Kolorwanie:
Status:
1234567891011121314151617181920212223
#include <iostream>
#include <cmath>
using namespace std;

struct Point
{
    int x;
    int y;
    int z;
};

float dst(Point a, Point b)
{
    return sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y)+(a.z-b.z)*(a.z-b.z));
}

int main()
{
    Point a ={0,0,0};
    Point b = {0,3,0};
    cout << dst(a,b);
    return 0;
}

Copyrights 2014-2021 © Wklejaj.pl Wszelkie prawa zastrzeżone.