Aufgaben
This commit is contained in:
13
Zimmermann, Sascha/PTP1/Kraftstoffverbrauch.java
Normal file
13
Zimmermann, Sascha/PTP1/Kraftstoffverbrauch.java
Normal file
@@ -0,0 +1,13 @@
|
||||
public class Kraftstoffverbrauch {
|
||||
public static void main(String args[]){
|
||||
double gefahreneKm = 437;
|
||||
double verbrauchterKraftstoff = 28.9;
|
||||
|
||||
double verbrauch100Km = (verbrauchterKraftstoff / gefahreneKm) * 100;
|
||||
|
||||
System.out.println("Gefahrene KM: " + gefahreneKm);
|
||||
System.out.println("Verbrauchter Kraftstoff: " + verbrauchterKraftstoff +" Liter");
|
||||
System.out.println("Verbrauch je 100km: " + verbrauch100Km + " Liter je 100Km");
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user