-
main.rs
-
names
fn main() {
/* declaring name */
let name = "User One";
/* printing it out */
println!("name: {}", name);
}
- numbers (int)
fn main() {
/* for storing or declaring int use u32 */
let age:u32 = 20;
/* printing the data that we stored */
println!("age: {} ", age);
}
$ cargo run