GitHub

Practice

Practice - 002

A program to declare, initialize and print integer, floating point number and character datatypes

fn main() {
practice2()
}
fn practice2() {
let i: u8 = 123;
let y: f32 = 3.0;
let f: bool = false;
let z: char = 'ℤ';
println!("{}", i);
println!("{}", y);
println!("{}", f);
println!("{}", z);
}

Result

123
3
false
Previous
Practice - 001