Say Hello Function
Create a function called say_hello that prints Hello! — then call it 3 times from main.
Expected output:
text
Hello! Hello! Hello!
Hints:
- Define your function with
fn say_hello()abovefn main() - Inside the function, use
println!("Hello!"); - Call it three times inside
mainwithsay_hello();
rust
fn main() {
}