mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-02 19:28:19 +08:00
10 lines
150 B
Rust
10 lines
150 B
Rust
|
extern "C" {
|
||
|
fn abs(input: i32) -> i32;
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
unsafe {
|
||
|
println!("Absolute value of -3 according to C: {}", abs(-3));
|
||
|
}
|
||
|
}
|