1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| public class test020 { public static void main(String[] args) { int[] array = sumAndPingJunShu(1,2,3);
for (int i : array) { System.out.println(i); }
} public static int[] sumAndPingJunShu(int a,int b,int c) { int sum = a + b + c; int pjs = (a + b + c) / 3; int cj = a * b * c; int[] array = {sum,pjs,cj}; return array; } }
|