题解 | #浮点数的个位数字#
浮点数的个位数字
https://www.nowcoder.com/practice/ffa94d27c6534396aef38813535c279f
use std::io; fn main() { let mut input = String::new(); io::stdin().read_line(&mut input).unwrap(); let x: f32 = input.trim().parse().unwrap(); let digit = x as i32 % 10; println!("{}", digit); }