2024-12-11 12:36:19 +01:00
|
|
|
fn add(a: int, b: int) -> int {
|
2024-12-12 15:37:56 +01:00
|
|
|
a + b
|
2024-11-20 22:12:08 +01:00
|
|
|
}
|
|
|
|
|
2024-12-11 12:36:19 +01:00
|
|
|
fn main() -> int {
|
|
|
|
let result = 0;
|
2025-01-17 07:44:53 +01:00
|
|
|
|
|
|
|
let a = 0;
|
|
|
|
let b = a;
|
|
|
|
let c = b;
|
|
|
|
let d = c;
|
|
|
|
|
|
|
|
|
|
|
|
let i = c;
|
2024-12-11 12:36:19 +01:00
|
|
|
loop {
|
2024-12-12 15:37:56 +01:00
|
|
|
if i >= 10 {
|
2024-12-11 12:36:19 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
result = add(result, 5);
|
2024-12-12 15:37:56 +01:00
|
|
|
i = i + 1;
|
2024-11-20 22:12:08 +01:00
|
|
|
}
|
2024-12-11 12:36:19 +01:00
|
|
|
result
|
2024-11-20 22:12:08 +01:00
|
|
|
}
|
|
|
|
|