带偏移索引的求和数组
//package com.nowjava; /** from * N o w J a v a . c o m **/ public class Main { public static double sum(double[] input, int offset, int len) { double sum = 0; for (int i = offset; i < offset + len; i++) { sum += input[i]; } return sum; } }