public static void main(String[] args) {
double x,sum;
double[] series = new double[30];
Scanner input = new Scanner(System.in);
System.out.println("enter a num: ");
x = input.nextInt();
sum = x;
for (int i = 3; i <= 27 ; i+=2){
int a = 0;
a++;
for (int j = 1 ; j <= i ; j++ ){
series[a] = x/j;
System.out.println(series[a] );
}
}
//if (i == 27){
boolean add = true;
for (int b = 1; b <= 27 ; b++ ){
if (add == true){
sum -= series[b];
}
else {
sum += series[b];
}
}
}
}
所以我要做的是将(x / j)的结果存储在我的系列中。阵列...?这意味着x ^(i)/ i!事情....我误解了如何计算Sin(X)的方法吗?