|
@ -154,6 +154,30 @@ public class ProgrammMain { |
|
|
return binary; |
|
|
return binary; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void schaltjahr() { |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("Welches Jahr möchtest du untersuchen?"); |
|
|
|
|
|
|
|
|
|
|
|
Scanner scanner2 = new Scanner(System.in); |
|
|
|
|
|
|
|
|
|
|
|
String jahr = scanner2.nextLine(); |
|
|
|
|
|
int jahr1 = Integer.parseInt(jahr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Bestimmen+Ausgabe |
|
|
|
|
|
|
|
|
|
|
|
if( jahr1 % 400 == 0 ) System.out.println("Schaltjahr!"); |
|
|
|
|
|
else if( jahr1 % 100 == 0 ) System.out.println("Kein Schaltjahr!"); |
|
|
|
|
|
else if( jahr1 % 4 == 0 ) System.out.println("Schaltjahr!"); |
|
|
|
|
|
else System.out.println("Kein Schaltjahr!"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
public static void main(String[] args) { |
|
|
public static void main(String[] args) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|