 
class H4YOEx10 {
	 public static double[] R(double xi[],double yi[])
	 {
	  int n1=xi.length;
	  int n2=yi.length;
	  double R1[]=new double[n1];
	  if(n1!=n2) 
	  {System.out.println("hata, boyutlar farklý");
       return R1;
	  }
	  for(int i=0;i<n1;i++)
	  {R1[i]=Math.sqrt(xi[i]*xi[i]+yi[i]*yi[i]);}
	  return R1;	 
	 }
	 
     public static void main (String args[]) 
     {
	 double x[]={1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9};
	 double y[]={1,2,3,4,5,6,7,8,9};
	 double R2[]=R(x,y);
	 for(int i=0;i<x.length;i++)
	 {System.out.println("R["+i+"] = "+R2[i]);}     
     }
}
