Update Tonsignal.java

This commit is contained in:
DerTyp187
2021-11-08 13:02:16 +01:00
parent b8c36e9396
commit 17d97b58da

View File

@@ -19,21 +19,17 @@ public class Tonsignal {
for(int c = 0; c < first.length; c++){ for(int c = 0; c < first.length; c++) {
if(c == 0){ if (c == 0) {
first[c] = (first[c+1] + first[c+2])/2; first[c] = (first[c + 1] + first[c + 2]) / 2;
}else if(c == first.length-1){ } else if (c == first.length - 1) {
first[c] = (first[c-1] + first[c-2])/2; first[c] = (first[c - 1] + first[c - 2]) / 2;
}else{ } else {
first[c] = (first[c-1] + first[c+1])/2; first[c] = (first[c - 1] + first[c + 1]) / 2;
} }
System.out.print(first[c] + " "); System.out.print(first[c] + " ");
} }
} }
} }