public class Test11 {
public static void main(String[] args){
double c = 0 ;
double p = 0;
System.out.println("请输入I的值");
double [] arr ={-5536.065,-425.532,1911.24,3009.24,3009.24,3009.24,3009.24,3009.24,3009.24,3009.24,3009.24,6859.42};
Scanner sc = new Scanner(System.in);
double I = sc.nextInt();
for(int n=1;n<13;n++){
c = (1+I)^(-n);//这个地方编译出错,求解答
System.out.println("第"+I+"年"+" c "+c);
for(int i =0;i<arr.length;i++){
p=arr*c;
System.out.println("第"+I+"年"+" p "+p);
}
}
}
}
|
|