2022-06-17 14:50:06 +00:00
|
|
|
type IntPair = struct {
|
|
|
|
fst: int,
|
|
|
|
snd: int,
|
|
|
|
}
|
|
|
|
|
2022-07-19 06:30:25 +00:00
|
|
|
fn getX() -> IntPair {
|
|
|
|
return new IntPair {
|
2022-06-17 14:50:06 +00:00
|
|
|
fst: 4,
|
|
|
|
snd: 6,
|
|
|
|
};
|
2022-07-19 06:30:25 +00:00
|
|
|
}
|
2022-06-17 14:50:06 +00:00
|
|
|
|
2022-07-19 06:30:25 +00:00
|
|
|
fn main() -> int {
|
|
|
|
let x = getX();
|
2022-06-17 14:50:06 +00:00
|
|
|
return x.fst + x.snd;
|
|
|
|
}
|