Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Fix the Concatenation

This program should print a sentence about a pet, but the format!() placeholders are wrong. Fix it!

Expected output:

text
My dog is named Buddy and is 3 years old.
rust
fn main() {
let animal = "dog";
let name = "Buddy";
let age = 3;

println!("My {} is named {} and is {} years old.", name, age, animal);
}