daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest May 25th, 2018 85 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1.     public void MonthlyGrowthRate(){//每月營收成長率
  2.         for(int i = 1 ; i < Revenue.length ; i++) {//從第2年度開始來做運算
  3.             for(int j = 0 ; j < Revenue[i].length ; j++) {
  4.                 System.out.printf("%.2f%s",(Revenue[i][j]/Revenue[i-1][j]*100),"% , ");//成長率:今年/去年*100%
  5. //              System.out.printf("%.2f%s",((Revenue[i][j]-Revenue[i-1][j])/Revenue[i-1][j]*100),"% , ");//成長率:(去年-今年)/去年*100%
  6.                 //%.2f,表算到小數點第2位,題目沒指定可忽略
  7.             }
  8.             System.out.println();
  9.         }
  10.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top