RosettaCodeData/Task/Jump-anywhere/C-sharp/jump-anywhere-6.cs
2023-07-01 13:44:08 -04:00

15 lines
275 B
C#

public int M(int n) {
int result = 0;
switch (n) {
case 1:
cost += 25;
break;
case 2:
cost += 25;
goto case 1;
case 3:
cost += 50;
goto case 1;
}
return result;
}