test.java
package yunsuan; import java.util.Scanner; public class test { static Scanner input=new Scanner(System.in); public static void main(String[] args) { // TODO 自动生成的方法存根 int[] x= {1,2,3,4,5}; int[] y={1,2,-3,-4,-5}; int[] z={6,1,2,0,5,4,1,2,0,5,4}; System.out.println(Largest(x,5)); System.out.println(Largest(y,5)); System.out.println(Largest(z,11)); } public static int Largest(int list[],int length) {int i,max=list[0]; for(i=0;i<=(length-1);i++) { if(list[i]>max) { max=list[i]; } } return max; } }
main.java
package yunsuan; import java.util.Scanner; import deal.Calculation; import deal.data; import deal.finl; import deal.sd; public class main { static Scanner input=new Scanner(System.in); public static void main(String[] args) { // TODO 自动生成的方法存根 data d = new data(); System.out.println(sd.read("2+2/2-3*4")); } }