#[link(name = "c")] extern "C" { fn scanf(format: *const u8, ...); } fn main() { let mut a = 0; let mut b = 0; unsafe { scanf("%d%d ".as_ptr(), &mut a, &mut b); } println!("{}", a + b); }
#[link(name = "c")] extern "C" { fn scanf(format: *const u8, ...); } fn main() { let mut a = 0; let mut b = 0; unsafe { scanf("%d%d ".as_ptr(), &mut a, &mut b); } println!("{}", a + b); }