//2 #include #include using namespace std; int main() { float x,y,dist,xmax=0,ymax=0,max=0; float count12=0,sum=0,countcircle=0,average; cout<<"Dose x,y "; cin>>x>>y; while (x!=0 || y!=0) { dist=sqrt(x*x+y*y); if (y>0 && dist>max) {max=dist;count12++;xmax=x;ymax=y;} if (dist<2) {sum=sum+dist;countcircle++;} cout<<"Dose x,y "; cin>>x>>y; } if (count12>0) cout << max << "(" << xmax << "," << ymax << ")" << endl; else cout << "NO points I II" << endl; if (countcircle>0) {average=(float ) sum/countcircle; cout << average << endl;} else cout << "NO points in circle" << endl; system("PAUSE"); return 0; }