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

View File

@@ -0,0 +1,17 @@
import java.util.Scanner;
public class Kraftstoffverbrauch {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
double gefahreneKm = 55.0;
double kraftstoffmenge = 5.0;
System.out.print("KM: ");
if(input.hasNextDouble()) {
gefahreneKm = input.nextDouble();
}
System.out.print("kraftstoffmenge: ");
if(input.hasNextDouble()) {
kraftstoffmenge = input.nextDouble();
}
System.out.println("Kraftstoffverbrauch: " + ((kraftstoffmenge/gefahreneKm)*100));
}
}