primitive-type
Rust u32: 32-bit unsigned integer
`u32` stores nonnegative whole numbers in 32 bits. Its range is 0 through 4,294,967,295. A nonnegative count with a fixed 32-bit width. Expected output: 1500000 Why: The chosen value is representable by u32. Common mistake: Subtracting a larger value can overflow.
Formal Syntax & Structure
rust syntaxrust
let name: u32 = integer_literal;Working Example
Example Snippetrust
fn main() { let population: u32 = 1500000; println!("{population}");}