1. import java.util.*;
  2. public class verbrauch
  3. {
  4. public static void main(String[] args)
  5. {
  6. Scanner muh=new Scanner(System.in);
  7.  
  8. float x, y;
  9.  
  10. System.out.println("Es werden die Benzinkosten berechnet.");
  11. System.out.print("Gebe die gefahrene Strecke in km ein: "); x=muh.nextInt();
  12. System.out.print("Gebe den Benzinverbrauch in Milliliter ein: "); y=muh.nextInt();
  13. x=(y/x);
  14. x=x*100;
  15. y=(x/1000);
  16. y= y*132;
  17. System.out.println();
  18. System.out.println("Der Benzinpres von 132 Cent pro Liter wird verwendet.");
  19. System.out.println();
  20. System.out.println("Der Vebrauch in Milliliter auf 100km betr„gt: "+x);
  21. System.out.print("Die Kosten pro 100km betragen: "+y);
  22.  
  23. }}