java practice (companies with annual sales sum)

 

 

/ * B: With annual revenues of summing 
        a company in accordance with the statistical data quarterly and March are as follows: Unit (million) 
        in the first quarter: 22,66,44 
        in the second quarter: 77,33,88 
        third quarter: 25, 45 and 65 
        in the fourth quarter: 11,66,99 
    * / 
    int [] [] = {arrNext {22,66,44}, {77,33,88}, {25,45,65}, {11, 66 , 99 }};
     int SUM = 0 ;
     for ( int I = 0; I <arrNext.length; I ++ ) {
             for ( int J = 0; J <arrNext [I] .length; J ++ ) { 
                SUM + = arrNext [ I] [J]; 
            } 
        } 
    System.out.println (SUM);

Guess you like

Origin www.cnblogs.com/l1314/p/12033251.html