public class Stepper
{
enum Roman {I,V,X,L,C,M}
public static void main(String... args)
{
int x=7;
int z=2;
Roman r = Roman.X;
do
{
switch(r)
{
case C : r = Roman.L;break;
case X : r = Roman.C;
case L : if(r.ordinal()>2)
{
z += 5;//7,13,19
}
case M : x++;//8,9,10
}
z++;//8,14,20
}
while (x<10);
System.out.println(z); //
}
}
问问题
155 次