求大家给个思路

解决方案 »

  1.   

    public class Test7{
    public static void main(String[] args)throws Exception{
    int sign=1;
    int sum=0;
    for(int i=10;i<=1000;i+=10){
    sum+=(i+3)*sign;
    sign*=-1;
    }
    System.out.println(sum);
        }
    }
      

  2.   

    大虫子正解  楼主题目写错了:用java编写小程序,求13-23+33-43+...+973-983+993_1003估计是手抖了楼主 有个请求 能不能换个头像啊 
      

  3.   


            int sum = 0;
            for(int i = 13, n = 0; i <= 1003; i+=10,n++)
            {
                double temp = i * Math.pow(-1, n);
                System.out.println(temp);
                sum += temp;
                
            }
            System.out.println(sum);
        }