1) Se citesc coordonatele a 3 puncte din plan. Sa se verifice daca punctele sunt varfurile unui triunghi isoscel.
#include<iostream>2. Se citesc coordonatele a n puncte in plan. Sa se afiseze numarul de puncte din fiecare cadran.
using namespace std;
struct punct
{float x,y;};
int main ()
{ float p,q,r;
punct A,B,C;
cin>>A.x>>A.y;
cin>>B.x>>B.y;
cin>>C.x>>C.y;
p=sqrtl((A.x-B.x)*(A.x-B.x)+(A.y-B.y)*(A.y-B.y));
q=sqrtl((A.x-C.x)*(A.x-C.x)+(A.y-C.y)*(A.y-C.y));
r=sqrtl((B.x-C.x)*(B.x-C.x)+(B.y-C.y)*(B.y-C.y));
if(p==q || p==r || q==r)
cout<<"DA";
else cout<<"NU";
}
#include<iostream>
using namespace std;
struct punct
{float x,y;};
int main ()
{ int n,c1=0,c2=0,c3=0,c4=0,c5=0,i;
punct a[100];
cin>>n;
for(i=0;i<n;i++)
{ cin>>a[i].x>>a[i].y;
if(a[i].x>0 && a[i].y>0)c1++;
if(a[i].x<0 && a[i].y>0)c2++;
if(a[i].x<0 && a[i].y<0)c3++;
if(a[i].x>0 && a[i].y<0)c4++;
if(a[i].x==0 || a[i].y==0)c5++;
cout<<endl;}
cout<<c1<<endl<<c2<<endl<<c3<<endl<<c4<<endl<<"Pe axe: "<<c5;
}