Skip to content

Instantly share code, notes, and snippets.

@scdekov
Created December 23, 2014 21:29
Show Gist options
  • Save scdekov/47cd4dcc7e3ff39bb91f to your computer and use it in GitHub Desktop.
Save scdekov/47cd4dcc7e3ff39bb91f to your computer and use it in GitHub Desktop.
struct tochka
{
float x,y;
};
struct otsechka
{
tochka m,n
};
float duljina(otsechka a)
{
return sqrt(pow(a.n.x-a.m.x,2)+(a.n.y-a.m.y,2))
}
int main()
{
otsechka a;
cout<<duljina(a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment