We've wrritten this code:
fn main_function() {
println!("Hello AlgoCademy!");
println!("Coding is amazing!");
println!("Functions are so useful!");
println!("Hello AlgoCademy!");
println!("Coding is amazing!");
println!("Functions are so useful!");
println!("Hello AlgoCademy!");
println!("Coding is amazing!");
println!("Functions are so useful!");
}
Write the same code in a better way by creating and calling a function print_messages()
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check