public class Main {/** N o w J a v a . c o m 提 供 **/
public static void main(String[] arguments) {
int[] myArray = { 1_900_000, 1_700_000, 1_700_000 };
int[] my = new int[myArray.length];
int[] total = new int[myArray.length];
int average;
my[0] = 1_900_000;
my[1] = 1_800_000;
my[2] = 1_750_000;
total[0] = myArray[0] + my[0];
total[1] = myArray[1] + my[1];
total[2] = myArray[2] + my[2];/**来自 N o w J a v a . c o m**/
average = (total[0] + total[1] + total[2]) / 3;
System.out.print("2009 production: ");
System.out.format("%,d%n", total[0]);
System.out.print("2010 production: ");
System.out.format("%,d%n", total[1]);
System.out.print("2011 production: ");
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。