Compare commits

...

2 Commits

Author SHA1 Message Date
hummel 87de67386c fix: Ergänze weitere Demo-Ausgabe. 2024-06-14 13:49:19 +02:00
hummel 1e47d490ad fix: Verbessere Willkommensnachricht 2024-06-14 13:19:16 +02:00
1 changed files with 4 additions and 1 deletions

View File

@ -3,13 +3,16 @@ package de.hs_mannheim.informatik.gitdemo;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Hallo Welt!"); System.out.println("Hallo Welt! Willkommen an der HS Mannheim.");
Main m = new Main(); Main m = new Main();
System.out.println(); System.out.println();
System.out.printf("Die Summe von %d + % d = %d", 3, 8, m.add(3, 8)); System.out.printf("Die Summe von %d + % d = %d", 3, 8, m.add(3, 8));
System.out.printf("Es geht noch besser: %d + %d + %d = %d", 2, 5, 9, m.add(2, 5, 9)); System.out.printf("Es geht noch besser: %d + %d + %d = %d", 2, 5, 9, m.add(2, 5, 9));
int[] arr = {1, 2, 3, 4};
System.out.printf("Da geht noch mehr: %d + %d + %d = %d", arr, m.add(arr));
} }
public int add(int... numbers) { public int add(int... numbers) {