public static double[] ds(int n) throws Exception {
   for (int i = 1; i <= n; i++) tempdoubles[i] = in.nextDouble();
   return tempdoubles;
 }
 public static double d() throws Exception {
   return in.nextDouble();
 }