Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File g = new File("C:/Users/angd6/Downloads/spannbreite.txt");
- b = new int[10000];
- try {
- Scanner sc2 = new Scanner (g);
- max = 0;
- for(int i = 0; i <= b.length-1; i++) {
- b[i] = sc2.nextInt();
- }for (int k = 0; k <= b.length-1; k++) {
- for(int j = b.length -1; j == k; j--) {
- c = new int[1000];
- c[k] = j;
- if(max <= c[k]) {
- max = c[k];
- }
- }}
- sc2.close();
- }catch(FileNotFoundException e) {
- System.out.println("Datei nicht vorhanden");
- }return c[c.length-1];
- }
Add Comment
Please, Sign In to add comment