This commit is contained in:
Mykola Fesenko
2025-07-29 08:08:23 +02:00
commit 899a05907b
355 changed files with 11002 additions and 0 deletions

25
4/A4.~ava Normal file
View File

@@ -0,0 +1,25 @@
import java.util.Arrays;
import java.util.Scanner;
public class A4 {
public static void main(String args[]) {
double schueler[] = new double[18];
Scanner input = new Scanner(System.in);
for (int i = 0; i < schueler.length;i++ ) {
System.out.print((i+1) + ". ");
schueler[i] = input.nextDouble();
}
Arrays.sort(schueler);
for (int i = 0; i < schueler.length;i++ ) {
System.out.println((i+1)+". " + schueler[i]);
}
double durschnittlich = 0;
for (int i = 0; i < schueler.length;i++ ) {
durschnittlich += schueler[i];
}
System.out.println("Durschnittlich: " + (Math.round((durschnittlich/schueler.length) *10.0 )/10.0 ) );
}
}