2022-04-06 11:20:47 +00:00
|
|
|
fn main() -> int {
|
2022-07-18 02:00:19 +00:00
|
|
|
let x = 25;
|
2022-04-06 11:20:47 +00:00
|
|
|
|
2022-07-18 02:00:19 +00:00
|
|
|
if x < 10 {
|
2022-04-06 11:20:47 +00:00
|
|
|
return 10;
|
2022-07-18 02:00:19 +00:00
|
|
|
} else if x > 50 {
|
|
|
|
return 50;
|
2022-04-06 11:20:47 +00:00
|
|
|
} else {
|
2022-07-18 02:00:19 +00:00
|
|
|
if x < 20 {
|
|
|
|
return 20;
|
|
|
|
} else if x > 40 {
|
|
|
|
return 40;
|
|
|
|
} else {
|
|
|
|
return x;
|
|
|
|
}
|
2022-04-06 11:20:47 +00:00
|
|
|
}
|
|
|
|
}
|