Answers for "Print in rust"

1

rust printing string on stdout

fn main() {
	println!(); // prints just a newline
	println!("hello there!");
    // x can be any var that implements the std::fmt::Display trait
	let x = true;
	println!("x is {}", x);
}
Posted by: Guest on February-21-2020
0

Print in rust

fn main() {
    println!("Hello, world!");
}
Posted by: Guest on September-10-2021

Browse Popular Code Answers by Language