forked from Labore/PR2-L
style fixes
parent
82a24bbdd9
commit
b8c5365f9f
|
|
@ -15,7 +15,7 @@ public class Eingabe {
|
||||||
|
|
||||||
// Daten ausgaben und einlesen
|
// Daten ausgaben und einlesen
|
||||||
cons.printf("\n");
|
cons.printf("\n");
|
||||||
cons.printf(" Geben Sie Ihren vollständigen Namen ein: ");
|
cons.printf(" Geben Sie Ihren vollständigen Namen ein: ");
|
||||||
name = cons.readLine();
|
name = cons.readLine();
|
||||||
|
|
||||||
cons.printf(" Geben Sie Ihr Geburtstagsjahr ein: ");
|
cons.printf(" Geben Sie Ihr Geburtstagsjahr ein: ");
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,22 @@
|
||||||
|
|
||||||
public class Roemisch {
|
public class Roemisch {
|
||||||
public enum Roman {
|
public enum Roman {
|
||||||
I(1), V(5), X(20), L(50), C(100),
|
I(1), V(5), X(20), L(50), C(100), D(500), M(1000);
|
||||||
D(500), M(1000);
|
|
||||||
private final int wert;
|
private final int wert;
|
||||||
|
|
||||||
Roman(int wert) {
|
Roman(int wert)
|
||||||
this.wert = wert; }
|
{
|
||||||
|
this.wert = wert;
|
||||||
|
}
|
||||||
|
|
||||||
public int getWert() {
|
public int getWert() {
|
||||||
return wert; }
|
return wert;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static void main(String [] args) {
|
public static void main(String [] args)
|
||||||
for(Roman r : Roman.values()) {
|
{
|
||||||
System.out.println(r.getWert()
|
for(Roman r : Roman.values()) {
|
||||||
+ "\t" + r.ordinal());
|
System.out.println(r.getWert() + "\t" + r.ordinal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue